* gimple-ssa-store-merging.c (struct store_immediate_info): Add
[official-gcc.git] / gcc / testsuite / objc.dg / pr23214.m
blob341a2837da5b9f45671a552c90a30dc379fcf29e
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" } { "" } } */
6 /* { dg-additional-options "-framework Foundation" { target { { *-*-darwin* } && objc2 } } } */
8 #if defined (__NEXT_RUNTIME__) && defined(__OBJC2__) \
9     && defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \
10     && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1070
11 #include <objc/Protocol.h>
12 #define OBJECT NSObject
13 #else
14 #include <objc/Object.h>
15 #define OBJECT Object
16 #include <objc/Protocol.h>
17 #endif
19 @interface OBJECT (TS_CAT)
20 - test;
21 @end
23 @implementation OBJECT (TS_CAT)
24 - test { return self; }
25 @end
27 @protocol A
28 @end
30 @protocol B 
31 @end
33 @interface Dummy : OBJECT <B>
34 @end
36 int main ()
38   [@protocol(A) test];
39   [@protocol(B) test];
41   return 0;
44 @implementation Dummy
45 @end