summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/initlist8.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/initlist8.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist8.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist8.C b/gcc/testsuite/g++.dg/cpp0x/initlist8.C
new file mode 100644
index 000000000..db63eee78
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist8.C
@@ -0,0 +1,19 @@
+// PR c++/37740
+// { dg-options "-std=c++0x" }
+
+struct A
+{
+ int i;
+};
+
+struct B
+{
+ double d;
+ A i;
+};
+
+int main()
+{
+ A a;
+ new B{3.2, a};
+}