aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/obj-c++.dg/fix-and-continue-2.mm
blob: 03ae9ebd9cc268629d337423a7fd6905d1a61007 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* Static variables, even if local, require indirect access through a stub
   if -mfix-and-continue is enabled.  */

/* Author: Ziemowit Laski <zlaski@apple.com> */
   
/* { dg-do assemble { target *-*-darwin* } } */
/* { dg-options "-mfix-and-continue" } */

#include "../objc-obj-c++-shared/TestsuiteObject.h"

@interface Foo: TestsuiteObject
+ (TestsuiteObject *)indexableFileTypes;
@end

@implementation Foo
+ (TestsuiteObject *)indexableFileTypes
{
  static TestsuiteObject *fileTypes = 0;
  if(!fileTypes) {
    fileTypes = [TestsuiteObject new];
  }
  return fileTypes;
}
@end