OSDN Git Service

2011-01-08 Dominique d'Humieres <dominiq@lps.ens.fr>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / objc.dg / comp-types-7.m
1 /* { dg-do compile } */
2 /* We used to ICE because we removed the cast to List_linked*
3    in -[ListIndex_linked next]. */
4
5 @interface List
6 {
7 @public
8   int firstLink;
9 }
10 @end
11
12 @interface ListIndex_linked
13 {
14 @public
15   List *collection;
16   int link;
17 }
18 @end
19
20 @interface List_linked: List
21 @end
22
23 @implementation List
24 @end
25
26 @implementation ListIndex_linked
27 - next
28 {
29    link = ((List_linked*)collection)->firstLink;
30 }
31 @end
32