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
8 for the first one. This only happened for ObjC, but it's good to
9 test ObjC++ as well. */
12 #include <objc/objc.h>
14 @interface MyRootClass1
35 @implementation MyRootClass1
36 - (id) init { return self; }
40 @interface MyRootClass2
57 /* Adding the 16th variable used to cause bogus warnings to be
64 @implementation MyRootClass2
65 - (id) init { return self; } /* This should not generate a bogus warning. */