Make tree-ssa-strlen.c handle partial unterminated strings
[official-gcc.git] / gcc / testsuite / objc / execute / object_is_meta_class.m
blob217873f53edc219715c139bd4f07b2f68f60d34b
1 /* Contributed by Nicola Pero - Tue Jul  3 10:55:21 BST 2001 */
3 #include "../../objc-obj-c++-shared/runtime.h"
4 #include "../../objc-obj-c++-shared/TestsuiteObject.m"
6 /* This test demonstrate a failure in object_is_meta_class which was fixed */
8 @interface EvilClass : TestsuiteObject
10   Class super_class;
11   const char* name;
12   long version;
13   unsigned long info;    
15 @end
17 @implementation EvilClass
18 - (id) init
20   self = [super init];
21   /* The following one is used in the runtime to mark meta classes */
22   info = 0x2L;
23   return self;
25 @end
27 int main (void)
29   /* Create an object of our EvilClass */
30   EvilClass *evilObject = [EvilClass new];
31   
32   /* Now check that the object is not a meta class object */
33   if (class_isMetaClass (object_getClass (evilObject))
34       && class_isMetaClass (evilObject))
35     {
36       printf ("object_is_meta_class failed\n");
37       abort ();
38     }
40   return 0;