blob: 429fce3e80b75752751ed16a32a11c3f818bce35 (
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
25
26
27
28
29
30
|
/* Test that compiling for the GNU runtime works (regardless of
the system runtime used). */
/* Author: Ziemowit Laski <zlaski@apple.com> */
/* { dg-do run } */
/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
#include <objc/Object.h>
#include <stdlib.h>
@interface FooBar: Object
- (void)boo;
@end
int called = 0;
@implementation FooBar
- (void)boo
{
called ++;
}
@end
int main ()
{
id fooBarInst = [[FooBar alloc] init];
[fooBarInst boo];
if (called != 1)
abort ();
return 0;
}
|