OSDN Git Service

2010-11-05 Steve Ellcey <sje@cup.hp.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / objc.dg / pr23214.m
1 /* Test that there is no problem initializing multiple static
2    Protocol instances.  */
3
4 /* { dg-do run } */
5 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
6 /* { dg-additional-sources "../objc-obj-c++-shared/Object1.m" } */
7
8 #import "../objc-obj-c++-shared/Object1.h"
9 #import "../objc-obj-c++-shared/Protocol1.h"
10
11 @protocol A
12 @end
13
14 @protocol B 
15 @end
16
17 @interface Dummy : Object <B>
18 @end
19
20 int main ()
21 {
22   [@protocol(A) class];
23   [@protocol(B) class];
24
25   return 0;
26 }
27
28 @implementation Dummy
29 @end