summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/initlist29.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/initlist29.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist29.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist29.C b/gcc/testsuite/g++.dg/cpp0x/initlist29.C
new file mode 100644
index 000000000..1568678e0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist29.C
@@ -0,0 +1,14 @@
+// PR c++/42331
+// { dg-options "-std=c++0x" }
+
+class Mesh
+{
+public:
+ Mesh(const char*)
+ { typele={0}; } // { dg-error "" }
+
+private:
+ int typele[7][2];
+};
+
+Mesh m(0);