1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010. */
3 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
5 /* Test the property syntax in a number of expressions. */
9 #include <objc/runtime.h>
11 @interface MyRootClass
16 /* Use the simplest synthesized accessor (assign, nonatomic) as we are
17 not testing the synthesized accessors in this test, just the
19 @property (nonatomic) int a;
25 @implementation MyRootClass
26 + (id) initialize { return self; }
27 + (id) alloc { return class_createInstance (self, 0); }
28 - (id) init { return self; }
40 MyRootClass *object = [[MyRootClass alloc] init];
41 MyRootClass *object2 = [[MyRootClass alloc] init];
44 object.a = object.a + object.a;
79 if (test (object.a) != 198)
87 for (object.a = 0; object.a < 99; object.a++)
90 if (object2.a != object.a - 1)