PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / obj-c++.dg / super-class-2.mm
blobefc72b8192781baa0bce183344d9783bd38da016
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.  */
5 /* { dg-do compile } */
7 #include "../objc-obj-c++-shared/TestsuiteObject.h"
9 @class MyWpModule;
11 @compatibility_alias MyObject TestsuiteObject;
12 @compatibility_alias FictitiousModule MyWpModule;
14 @protocol MySelTarget
15 - (id) meth1;
16 @end
18 @protocol Img
19 - (id) meth2;
20 @end
22 @interface FunnyModule: FictitiousModule <Img> /* { dg-error ".MyWpModule., superclass of .FunnyModule." } */
23 - (id) meth2;
24 @end
26 @interface MyProjWpModule : MyWpModule <MySelTarget, Img> /* { dg-error ".MyWpModule., superclass of .MyProjWpModule." } */ {
27   id i1, i2;
29 - (id) meth1;
30 - (id) meth2;
31 @end
33 @interface AnotherModule: MyObject <MySelTarget>
34 - (id) meth1;
35 @end