Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / objc.dg / super-class-4.m
blob5248123e79a7d0e58d2513895d75444c65518154
1 /* Bail out gracefully if attempting to derive from a class that has only been
2    forward-declared (via @class).  Conversely, @compatibility_alias declarations
3    should be traversed to find the @interface.  */
4 /* { dg-do compile } */
6 #include <objc/Object.h>
8 @class MyWpModule;
10 @compatibility_alias MyObject Object;
11 @compatibility_alias FictitiousModule MyWpModule;
13 @protocol MySelTarget
14 - (id) meth1;
15 @end
17 @protocol Img
18 - (id) meth2;
19 @end
21 @interface FunnyModule: FictitiousModule <Img> /* { dg-error ".MyWpModule., superclass of .FunnyModule." } */
22 - (id) meth2;
23 @end
25 @interface MyProjWpModule : MyWpModule <MySelTarget, Img> /* { dg-error ".MyWpModule., superclass of .MyProjWpModule." } */ {
26   id i1, i2;
28 - (id) meth1;
29 - (id) meth2;
30 @end
32 @interface AnotherModule: MyObject <MySelTarget>
33 - (id) meth1;
34 @end