1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-gc -emit-llvm -g -o - %s 2*f4a2713aSLionel Sambuc// Check that this doesn't crash when compiled with debugging on. 3*f4a2713aSLionel Sambuc@class Foo; 4*f4a2713aSLionel Sambuctypedef struct Bar *BarRef; 5*f4a2713aSLionel Sambuc 6*f4a2713aSLionel Sambuc@interface Baz 7*f4a2713aSLionel Sambuc@end 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc@interface Foo 10*f4a2713aSLionel Sambuc- (void) setFlag; 11*f4a2713aSLionel Sambuc@end 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc@implementation Baz 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambuc- (void) a:(BarRef)b 16*f4a2713aSLionel Sambuc{ 17*f4a2713aSLionel Sambuc Foo* view = (Foo*)self; 18*f4a2713aSLionel Sambuc [view setFlag]; 19*f4a2713aSLionel Sambuc} 20*f4a2713aSLionel Sambuc 21*f4a2713aSLionel Sambuc@end 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambuc 24*f4a2713aSLionel Sambuc@implementation Foo 25*f4a2713aSLionel Sambuc{ 26*f4a2713aSLionel Sambuc int flag : 1; 27*f4a2713aSLionel Sambuc} 28*f4a2713aSLionel Sambuc 29*f4a2713aSLionel Sambuc- (void) setFlag 30*f4a2713aSLionel Sambuc{ 31*f4a2713aSLionel Sambuc if (!flag) 32*f4a2713aSLionel Sambuc flag = 1; 33*f4a2713aSLionel Sambuc} 34*f4a2713aSLionel Sambuc 35*f4a2713aSLionel Sambuc@end 36