Merged r157653 through r157895 into branch.
[official-gcc.git] / gcc / testsuite / objc.dg / fix-and-continue-2.m
blobfdfbcbd0c18c4e3a63842ac66f2b40b020a6bae4
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/Object1.h"
11 @interface Foo: Object
12 + (Object *)indexableFileTypes;
13 @end
15 @implementation Foo
16 + (Object *)indexableFileTypes
18   static Object *fileTypes = 0;
19   if(!fileTypes) {
20     fileTypes = [Object new];
21   }
22   return fileTypes;
24 @end