view gcc/testsuite/objc.dg/fix-and-continue-2.m @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* 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