summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c99-flex-array-2.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-11 02:37:37 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-11 02:37:37 +0000
commite13656bf80e97f3065a8cedd0f38adf1bbc92079 (patch)
tree5bee4124db3aa41812d918dd7cf3440d0adfdeec /gcc/testsuite/gcc.dg/c99-flex-array-2.c
parente40a1d5cab338fbc758b0b7a9ae82f69174cce90 (diff)
downloadgcc-e13656bf80e97f3065a8cedd0f38adf1bbc92079.tar.gz
New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49664 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/c99-flex-array-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/c99-flex-array-2.c13
1 files changed, 13 insertions, 0 deletions
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
index 00000000000..299abef6543
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c99-flex-array-2.c
@@ -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" } */
+}