summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/init10.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/init10.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/init10.C23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/init10.C b/gcc/testsuite/g++.old-deja/g++.other/init10.C
new file mode 100644
index 000000000..7fd07fa89
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/init10.C
@@ -0,0 +1,23 @@
+// { dg-do run }
+int i;
+
+struct D {
+ D () {
+ i++;
+ }
+};
+
+struct C {
+ C() {}
+
+ D d[1];
+};
+
+
+int main ()
+{
+ C c;
+
+ if (i != 1)
+ return 1;
+}