Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / objc.dg / objc-foreach-2.m
blob0f79089f278471404d4600c7cda367ffe55a9c73
1 /* Syntax check for the new foreach statement. */
2 /* { dg-do compile } */
3 /* { dg-additional-options "-Wno-objc-root-class" } */
5 typedef struct objc_class *Class;
7 typedef struct objc_object {
8  Class isa;
9 } *id;
12 @interface MyList 
13 @end
15 @implementation MyList
16 - (unsigned int)countByEnumeratingWithState:(struct __objcFastEnumerationState *)state objects:(id *)items count:(unsigned int)stackcount
18         return 0;
20 - (void)addObject:object {
23 @end
25 @interface MyList (BasicTest)
26 - (void)compilerTestAgainst;
27 @end
28 void BEGIN();
29 void INFORLOOP();
30 void END();
31 @implementation MyList (BasicTest)
32 - (void)compilerTestAgainst {
34         id elem;
35         BEGIN();
36         for (elem in (self)) 
37           if (elem)
38             INFORLOOP();
39         END();
41 @end