OSDN Git Service

2005-06-28 Thomas Koenig <Thomas.Koenig@online.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / objc.dg / fix-and-continue-2.m
1 /* Static variables, even if local, require indirect access through a stub
2    if -mfix-and-continue is enabled.  */
3
4 /* Author: Ziemowit Laski <zlaski@apple.com> */
5    
6 /* { dg-do assemble { target *-*-darwin* } } */
7 /* { dg-options "-mfix-and-continue" } */
8
9 #include <objc/Object.h>
10
11 @interface Foo: Object
12 + (Object *)indexableFileTypes;
13 @end
14
15 @implementation Foo
16 + (Object *)indexableFileTypes
17 {
18   static Object *fileTypes = 0;
19   if(!fileTypes) {
20     fileTypes = [Object new];
21   }
22   return fileTypes;
23 }
24 @end