OSDN Git Service

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