gcc/testsuite/ChangeLog:
2016-01-30 Martin Sebor <msebor@redhat.com>
PR c++/68490
* g++.dg/ext/flexary10.C: New test.
From-SVN: r233010
+2016-01-30 Martin Sebor <msebor@redhat.com>
+
+ PR c++/68490
+ * g++.dg/ext/flexary10.C: New test.
+
2016-01-30 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/66707
--- /dev/null
+// PR c++/68490 - error initializing a structure with a flexible array member
+// { dg-do compile }
+// { dg-options "-Wpedantic" }
+
+struct A {
+ int n;
+ int a [];
+};
+
+struct A foo (void)
+{
+ // Verify the initializer below is accepted for compatibility with gcc
+ // (in C mode).
+ static struct A
+ a = { 2, { 1, 0 } }; // { dg-warning "initialization of a flexible array member" }
+
+ return a;
+}