summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/init6.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/init6.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/init6.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/init6.C b/gcc/testsuite/g++.old-deja/g++.other/init6.C
new file mode 100644
index 000000000..66e511a6b
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/init6.C
@@ -0,0 +1,13 @@
+// { dg-do run }
+// Test for default-initialization of POD-structs in functional cast notation.
+
+struct foo { int a[10]; };
+
+int main()
+{
+ foo f = foo();
+ int r = 0;
+ for (int i = 0; i < 10; ++i)
+ r |= f.a[i];
+ return r;
+}