PR c/47043
[official-gcc.git] / gcc / testsuite / objc.dg / fix-and-continue-2.m
blob03ae9ebd9cc268629d337423a7fd6905d1a61007
1 /* Static variables, even if local, require indirect access through a stub
2    if -mfix-and-continue is enabled.  */
4 /* Author: Ziemowit Laski <zlaski@apple.com> */
5    
6 /* { dg-do assemble { target *-*-darwin* } } */
7 /* { dg-options "-mfix-and-continue" } */
9 #include "../objc-obj-c++-shared/TestsuiteObject.h"
11 @interface Foo: TestsuiteObject
12 + (TestsuiteObject *)indexableFileTypes;
13 @end
15 @implementation Foo
16 + (TestsuiteObject *)indexableFileTypes
18   static TestsuiteObject *fileTypes = 0;
19   if(!fileTypes) {
20     fileTypes = [TestsuiteObject new];
21   }
22   return fileTypes;
24 @end