1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010. */
3 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
5 /* Test @synthesize for a @property which is not declared directly in
6 the @interface, but in a @protocol that the @interface conforms
10 #include <objc/runtime.h>
13 @interface MyRootClass
22 @implementation MyRootClass
23 + (id) initialize { return self; }
24 + (id) alloc { return class_createInstance (self, 0); }
25 - (id) init { return self; }
36 @interface Test : MyRootClass <MyProtocol, MyProtocol2>
50 Test *object = [[Test alloc] init];
52 /* Check that the synthesized methods exist and work. Do not invoke
53 them via property syntax - that is another test. Here we just
54 want to test the synthesis of the methods. */
57 if ([object v1] != 400)
62 if ([object v2] != 31)