aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2013-07-13 19:10:24 -0400
committerJason Merrill <jason@gcc.gnu.org>2013-07-13 19:10:24 -0400
commit16b53405ad2baba783cf7ecf34a623fd64db2dda (patch)
tree1dccabcb4f30ae988a32feff076c59c480009784 /gcc/testsuite/g++.dg/cpp0x
parent26d40c3d4bd444bcd3dc2d44d1a405dfb8db07ec (diff)
downloadgcc-16b53405ad2baba783cf7ecf34a623fd64db2dda.zip
gcc-16b53405ad2baba783cf7ecf34a623fd64db2dda.tar.gz
gcc-16b53405ad2baba783cf7ecf34a623fd64db2dda.tar.bz2
re PR c++/57402 (ICE: in make_decl_rtl, at varasm.c:1147 when initializing variable-sized array)
PR c++/57402 * init.c (build_vec_init): Use {} for arrays of class type. (build_vec_delete): Don't take the address of the array. From-SVN: r200939
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted45.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted45.C b/gcc/testsuite/g++.dg/cpp0x/defaulted45.C
new file mode 100644
index 0000000..e91b3a1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted45.C
@@ -0,0 +1,20 @@
+// { dg-do run }
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+ int i;
+ A() = default;
+ A(int i): i{i} { }
+ ~A() {}
+};
+
+int main(int argc, char **argv)
+{
+ { int i[4] = { 42, 42, 42, 42 }; }
+ {
+ A a[4] = { argc };
+ if (a[1].i != 0)
+ __builtin_abort ();
+ }
+}