diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/array-7.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/array-7.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/array-7.c b/gcc/testsuite/gcc.dg/array-7.c new file mode 100644 index 000000000..9e70b2682 --- /dev/null +++ b/gcc/testsuite/gcc.dg/array-7.c @@ -0,0 +1,14 @@ +/* Test for array of incomplete structure type - Zack Weinberg in + <http://gcc.gnu.org/ml/gcc-patches/2004-08/msg00108.html>. */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +struct foo; + +void +f (void) +{ + struct foo { int a; int b; }; +} + +struct foo array[5]; /* { dg-error "array type has incomplete element type" } */ |