Debian Codegraph @

gcc/testsuite/objc.dg/comp-types-7.m

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-Wno-objc-root-class" } */
3 /* We used to ICE because we removed the cast to List_linked*
4 in -[ListIndex_linked next]. */
5
6 @interface List
7 {
8 @public
9 int firstLink;
10 }
11 @end
12
13 @interface ListIndex_linked
14 {
15 @public
16 List *collection;
17 int link;
18 }
19 @end
20
21 @interface List_linked: List
22 @end
23
24 @implementation List
25 @end
26
27 @implementation ListIndex_linked
28 - next
29 {
30 link = ((List_linked*)collection)->firstLink;
31 }
32 @end
33