summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/synth8.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/synth8.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/synth8.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/synth8.C b/gcc/testsuite/g++.old-deja/g++.jason/synth8.C
new file mode 100644
index 000000000..29abc2ae6
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/synth8.C
@@ -0,0 +1,20 @@
+// { dg-do assemble }
+// Bug: the synthesized constructor for A tries to use the mem-initializer
+// list for the B constructor.
+
+struct A
+{
+ virtual ~A();
+};
+
+struct B
+{
+ B();
+ char* x;
+ A* a;
+};
+
+B::B()
+: x(0), a(new A())
+{
+}