blob: 71ae8a610ee8b097e0e22208cf3a17912203dfa9 [file] [log] [blame]
Galina Kistanova0ccb31c2011-06-03 22:24:54 +00001// REQUIRES: x86-64-registered-target
John McCalld1e40d52011-10-02 01:16:38 +00002// RUN: %clang_cc1 -masm-verbose -S -fblocks -g -triple x86_64-apple-darwin10 -fobjc-dispatch-method=mixed %s -o - | FileCheck %s
Devang Patel1ebb6f292011-05-24 00:22:40 +00003
4//Radar 9279956
5//CHECK: ## DW_OP_deref
6//CHECK-NEXT: ## DW_OP_plus_uconst
7
8typedef unsigned int NSUInteger;
9
10@protocol NSObject
11@end
12
13@interface NSObject <NSObject>
14- (id)init;
15+ (id)alloc;
16@end
17
18@interface NSDictionary : NSObject
19- (NSUInteger)count;
20@end
21
22@interface NSMutableDictionary : NSDictionary
23@end
24
25@interface A : NSObject {
26@public
27 int ivar;
28}
29@end
30
31static void run(void (^block)(void))
32{
33 block();
34}
35
36@implementation A
37
38- (id)init
39{
40 if ((self = [super init])) {
41 run(^{
42 NSMutableDictionary *d = [[NSMutableDictionary alloc] init];
43 ivar = 42 + (int)[d count];
44 });
45 }
46 return self;
47}
48
49@end
50
51int main()
52{
53 A *a = [[A alloc] init];
54 return 0;
55}