1*67e74705SXin Li// REQUIRES: x86-registered-target 2*67e74705SXin Li// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -S -o %t %s 3*67e74705SXin Li// RUN: FileCheck < %t %s 4*67e74705SXin Li 5*67e74705SXin Li// rdar://9072317 6*67e74705SXin Li 7*67e74705SXin Li/** The problem looks like clang getting confused when a single translation unit 8*67e74705SXin Li contains a protocol with a property and two classes that implement that protocol 9*67e74705SXin Li and synthesize the property. 10*67e74705SXin Li*/ 11*67e74705SXin Li 12*67e74705SXin Li@protocol Proto 13*67e74705SXin Li@property (assign) id prop; 14*67e74705SXin Li@end 15*67e74705SXin Li 16*67e74705SXin Li@interface NSObject @end 17*67e74705SXin Li 18*67e74705SXin Li@interface Foo : NSObject <Proto> { int x; } @end 19*67e74705SXin Li 20*67e74705SXin Li@interface Bar : NSObject <Proto> @end 21*67e74705SXin Li 22*67e74705SXin Li@implementation Foo 23*67e74705SXin Li@synthesize prop; 24*67e74705SXin Li@end 25*67e74705SXin Li 26*67e74705SXin Li@implementation Bar 27*67e74705SXin Li@synthesize prop; 28*67e74705SXin Li@end 29*67e74705SXin Li 30*67e74705SXin Li// CHECK: l_OBJC_$_INSTANCE_METHODS_Bar: 31*67e74705SXin Li// CHECK-NEXT: .long 24 32*67e74705SXin Li// CHECK-NEXT: .long 2 33*67e74705SXin Li// CHECK-NEXT: .quad L_OBJC_METH_VAR_NAME_ 34*67e74705SXin Li// CHECK-NEXT: .quad L_OBJC_METH_VAR_TYPE_ 35*67e74705SXin Li// CHECK-NEXT: .quad "-[Bar prop]" 36