2014-07-11 Edward Smith-Rowland <3dw4rd@verizon.net>
[official-gcc.git] / gcc / testsuite / obj-c++.dg / gnu-runtime-3.mm
blob56e48d791d4d90ba7ed6b1c908c933c45344d30b
1 /* Test that compiling for the GNU runtime works (regardless of
2    the system runtime used).  */
3 /* Author: Ziemowit Laski <zlaski@apple.com>  */
4 /* { dg-do run } */
5 /* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
7 #include "../objc-obj-c++-shared/TestsuiteObject.m"
8 #include <stdlib.h>
10 @interface FooBar: TestsuiteObject
11 - (void)boo;
12 @end
14 int called = 0;
16 @implementation FooBar
17 - (void)boo
19   called ++;
21 @end
23 int main ()
25   id fooBarInst = [[FooBar alloc] init];
26   [fooBarInst boo];
27   if (called != 1)
28     abort ();
29   return 0;