Remove outermost loop parameter.
[official-gcc/graphite-test-results.git] / gcc / testsuite / objc / execute / object_is_class.m
blob199517e43a22cf40e83e2cb75b3f906b8f0e2f77
1 /* Contributed by Nicola Pero - Tue Jul  3 10:55:21 BST 2001 */
2 #import "../../objc-obj-c++-shared/next-mapping.h"
3 #import "../../objc-obj-c++-shared/Object1.h"
4 #include <objc/objc.h>
5 #include <objc/objc-api.h>
7 /* This test demonstrate a failure in object_is_class which was fixed */
9 /* Create a class whose instance variables mirror the struct used for
10    Class structures in the runtime ... yes we're feeling evil today */
11 @interface EvilClass : Object
13   Class super_class;
14   const char* name;
15   long version;
16   unsigned long info;    
18 @end
20 @implementation EvilClass
21 - (id) init
23   self = [super init];
24   /* The following one is used in the runtime to mark classes */
25   info = 0x1L;
26   return self;
28 @end
30 int main (void)
32   /* Create an object of our EvilClass */
33   EvilClass *evilObject = [EvilClass new];
34   
35   /* Now check that the object is not a class object */
36   if (object_is_class (evilObject))
37     {
38       printf ("object_is_class failed\n");
39       abort ();
40     }
42   return 0;