gcc/
[official-gcc.git] / gcc / testsuite / objc.dg / pr23214.m
blobcf2631c9561433f7ffe792aa6d187b0b7213d619
1 /* Test that there is no problem initializing multiple static
2    Protocol instances.  */
4 /* { dg-do run } */
5 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
7 #include <objc/Protocol.h>
8  
9 @interface Object (TS_CAT)
10 - test;
11 @end
13 @implementation Object (TS_CAT)
14 - test { return self; }
15 @end
17 @protocol A
18 @end
20 @protocol B 
21 @end
23 @interface Dummy : Object <B>
24 @end
26 int main ()
28   [@protocol(A) test];
29   [@protocol(B) test];
31   return 0;
34 @implementation Dummy
35 @end