PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / objc.dg / type-size-1.m
blob51f95c7ef666d888c3ad0077bc3244ef1278e0d4
1 /* Reject ivars with an unknown size.  */
2 /* Contributed by Ziemowit Laski <zlaski@apple.com>.  */
3 /* { dg-do compile } */
5 struct unknownStruct;
7 @interface ArrayTest
9     short   unknownSize[unknownValue];  /* { dg-error ".unknownValue. (undeclared|was not declared)" } */
10     /* { dg-error "instance variable .unknownSize. has unknown size" "" { target *-*-* } .-1 } */
11     struct unknownStruct unknownObj;  /* { dg-error "field .unknownObj. has incomplete type" } */
12     /* { dg-error "instance variable .unknownObj. has unknown size" "" { target *-*-* } .-1 } */
13     long    knownSize[3];     /* ok */
14     char    zeroSize[2 - 2];  /* ok (apparently) */
15     int     missingSize[];  /* { dg-error "instance variable .missingSize. has unknown size" } */
17 @end