1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010. */
2 /* { dg-do compile } */
4 /* This test checks what happens if there are 16 instance variables.
5 In that case, the class was not created correctly. In this testcase,
6 we have two classes, one with 15 variables and one with 16. Older
7 GCCs would generate a bogus warning for the second class but not
11 #include <objc/objc.h>
13 #if defined(__has_attribute) && __has_attribute(objc_root_class)
14 __attribute__((objc_root_class))
16 @interface MyRootClass1
37 @implementation MyRootClass1
38 - (id) init { return self; }
42 #if defined(__has_attribute) && __has_attribute(objc_root_class)
43 __attribute__((objc_root_class))
45 @interface MyRootClass2
62 /* Adding the 16th variable used to cause bogus warnings to be
69 @implementation MyRootClass2
70 - (id) init { return self; } /* This should not generate a bogus warning. */