2017-11-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr65050.c
blob0822a99dfdaeecf815185353d52f89f0f208c919
1 /* PR c/65050 */
2 /* { dg-do compile } */
4 typedef int A[];
5 struct S { int i; A a[5]; } s; /* { dg-error "array type has incomplete element type .A {aka int\\\[\\\]}." } */
6 extern void foo (int p[2][]); /* { dg-error "array type has incomplete element type .int\\\[\\\]." } */
7 extern void bar (A p[2]); /* { dg-error "array type has incomplete element type .A {aka int\\\[\\\]}." } */
9 void
10 foo (int p[2][]) /* { dg-error "array type has incomplete element type .int\\\[\\\]." } */
14 void
15 bar (A p[2]) /* { dg-error "array type has incomplete element type .A {aka int\\\[\\\]}." } */
19 struct T;
20 struct T t[5]; /* { dg-error "array type has incomplete element type .struct T." } */
21 struct U u[] = { { "abc" } }; /* { dg-error "array type has incomplete element type .struct U." } */
22 typedef struct T TT;
23 TT tt[5]; /* { dg-error "array type has incomplete element type .TT {aka struct T}." } */