2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / objc / execute / static-2.m
blob4d7e7449bff16c6b7ba875af7c72588d252cda29
1 /* Contributed by Nicola Pero - Fri Mar  9 19:39:15 CET 2001 */
2 #include <objc/objc.h>
4 /* Test defining a static function *inside* a class implementation */
6 @interface Test
8   Class isa;
10 + (int) test;
11 @end
13 @implementation Test
15 static int test (void)
17   return 1;
20 + (int) test
22   return test ();
25 #ifdef __NEXT_RUNTIME__                                   
26 + initialize { return self; }
27 #endif
28 @end
30 int main (void)
32   if ([Test test] != 1)
33     {
34       abort ();
35     }
37   return 0;