Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / objc / execute / static-1.m
bloba778b722c15a37fe3ffb1dd01e1057e58f747589
1 /* Contributed by Nicola Pero - Fri Mar  9 19:39:15 CET 2001 */
2 #include <objc/objc.h>
4 /* Test defining a static variable *inside* a class implementation */
6 @interface Test
8   Class isa;
10 + (int) test;
11 @end
13 @implementation Test
15 static int test = 1;
17 + (int) test
19   return test;
22 #ifdef __NEXT_RUNTIME__                                   
23 + initialize { return self; }
24 #endif
25 @end
27 int main (void)
29   if ([Test test] != 1)
30     {
31       abort ();
32     }
34   return 0;