1 // RUN: %clang_cc1 -emit-llvm -o %t %s 2 3 @interface Object 4 - (id) new; 5 @end 6 7 @interface Tester : Object 8 @property char PropertyAtomic_char; 9 @property short PropertyAtomic_short; 10 @property int PropertyAtomic_int; 11 @property long PropertyAtomic_long; 12 @property long long PropertyAtomic_longlong; 13 @property float PropertyAtomic_float; 14 @property double PropertyAtomic_double; 15 @property(assign) id PropertyAtomic_id; 16 @property(retain) id PropertyAtomicRetained_id; 17 @property(copy) id PropertyAtomicRetainedCopied_id; 18 @property(retain) id PropertyAtomicRetainedGCOnly_id; 19 @property(copy) id PropertyAtomicRetainedCopiedGCOnly_id; 20 @end 21 22 @implementation Tester 23 @dynamic PropertyAtomic_char; 24 @dynamic PropertyAtomic_short; 25 @dynamic PropertyAtomic_int; 26 @dynamic PropertyAtomic_long; 27 @dynamic PropertyAtomic_longlong; 28 @dynamic PropertyAtomic_float; 29 @dynamic PropertyAtomic_double; 30 @dynamic PropertyAtomic_id; 31 @dynamic PropertyAtomicRetained_id; 32 @dynamic PropertyAtomicRetainedCopied_id; 33 @dynamic PropertyAtomicRetainedGCOnly_id; 34 @dynamic PropertyAtomicRetainedCopiedGCOnly_id; 35 @end 36 37 @interface SubClass : Tester 38 { 39 char PropertyAtomic_char; 40 short PropertyAtomic_short; 41 int PropertyAtomic_int; 42 long PropertyAtomic_long; 43 long long PropertyAtomic_longlong; 44 float PropertyAtomic_float; 45 double PropertyAtomic_double; 46 id PropertyAtomic_id; 47 id PropertyAtomicRetained_id; 48 id PropertyAtomicRetainedCopied_id; 49 id PropertyAtomicRetainedGCOnly_id; 50 id PropertyAtomicRetainedCopiedGCOnly_id; 51 } 52 @end 53 54 @implementation SubClass 55 @synthesize PropertyAtomic_char; 56 @synthesize PropertyAtomic_short; 57 @synthesize PropertyAtomic_int; 58 @synthesize PropertyAtomic_long; 59 @synthesize PropertyAtomic_longlong; 60 @synthesize PropertyAtomic_float; 61 @synthesize PropertyAtomic_double; 62 @synthesize PropertyAtomic_id; 63 @synthesize PropertyAtomicRetained_id; 64 @synthesize PropertyAtomicRetainedCopied_id; 65 @synthesize PropertyAtomicRetainedGCOnly_id; 66 @synthesize PropertyAtomicRetainedCopiedGCOnly_id; 67 @end 68 69 int main() 70 { 71 SubClass *f = [SubClass new]; 72 f.PropertyAtomic_int = 1; 73 74 f.PropertyAtomic_int += 3; 75 76 f.PropertyAtomic_int -= 4; 77 return f.PropertyAtomic_int; 78 } 79