2007-03-01 Paul Brook <paul@codesourcery.com>
[official-gcc.git] / gcc / testsuite / objc.dg / comp-types-7.m
blob526934fbb8211a0ea4e2be27278edbe77749d706
1 /* { dg-do compile } */
2 /* We used to ICE because we removed the cast to List_linked*
3    in -[ListIndex_linked next]. */
5 @interface List
7 @public
8   int firstLink;
10 @end
12 @interface ListIndex_linked
14 @public
15   List *collection;
16   int link;
18 @end
20 @interface List_linked: List
21 @end
23 @implementation List
24 @end
26 @implementation ListIndex_linked
27 - next
29    link = ((List_linked*)collection)->firstLink;
31 @end