New.
authorRichard Henderson <rth@gcc.gnu.org>
Mon, 11 Feb 2002 02:37:37 +0000 (18:37 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 11 Feb 2002 02:37:37 +0000 (18:37 -0800)
From-SVN: r49664

gcc/testsuite/gcc.dg/c99-flex-array-2.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/c99-flex-array-2.c b/gcc/testsuite/gcc.dg/c99-flex-array-2.c
new file mode 100644 (file)
index 0000000..299abef
--- /dev/null
@@ -0,0 +1,13 @@
+/* PR c/5623 */
+/* { dg-do compile } */
+
+struct blah {
+   int   number;
+   char  array[];
+};
+
+void foo(void)
+{
+   struct blah b;
+   b.array = "hi";  /* { dg-error "invalid use of flexible array member" } */
+}