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