1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o %t %s 2*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o %t %s 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc@interface I0 { 5*f4a2713aSLionel Sambuc@public 6*f4a2713aSLionel Sambuc _Complex float iv0; 7*f4a2713aSLionel Sambuc} 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc@property(assign) _Complex float p0; 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc-(_Complex float) im0; 12*f4a2713aSLionel Sambuc-(void) setIm0: (_Complex float) a0; 13*f4a2713aSLionel Sambuc@end 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambuc@implementation I0 16*f4a2713aSLionel Sambuc@dynamic p0; 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc-(id) init { 19*f4a2713aSLionel Sambuc self->iv0 = 5.0 + 2.0i; 20*f4a2713aSLionel Sambuc return self; 21*f4a2713aSLionel Sambuc} 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambuc-(_Complex float) im0 { 24*f4a2713aSLionel Sambuc printf("im0: %.2f + %.2fi\n", __real iv0, __imag iv0); 25*f4a2713aSLionel Sambuc return iv0 + (.1 + .2i); 26*f4a2713aSLionel Sambuc} 27*f4a2713aSLionel Sambuc-(void) setIm0: (_Complex float) a0 { 28*f4a2713aSLionel Sambuc printf("setIm0: %.2f + %.2fi\n", __real a0, __imag a0); 29*f4a2713aSLionel Sambuc iv0 = a0 + (.3 + .4i); 30*f4a2713aSLionel Sambuc} 31*f4a2713aSLionel Sambuc 32*f4a2713aSLionel Sambuc-(_Complex float) p0 { 33*f4a2713aSLionel Sambuc printf("p0: %.2f + %.2fi\n", __real iv0, __imag iv0); 34*f4a2713aSLionel Sambuc return iv0 + (.5 + .6i); 35*f4a2713aSLionel Sambuc} 36*f4a2713aSLionel Sambuc-(void) setP0: (_Complex float) a0 { 37*f4a2713aSLionel Sambuc printf("setP0: %.2f + %.2fi\n", __real a0, __imag a0); 38*f4a2713aSLionel Sambuc iv0 = a0 + (.7 + .8i); 39*f4a2713aSLionel Sambuc} 40*f4a2713aSLionel Sambuc@end 41*f4a2713aSLionel Sambuc 42*f4a2713aSLionel Sambucvoid f0(I0 *a0) { 43*f4a2713aSLionel Sambuc float l0 = __real a0.im0; 44*f4a2713aSLionel Sambuc float l1 = __imag a0->iv0; 45*f4a2713aSLionel Sambuc _Complex float l2 = (a0.im0 = a0.im0); 46*f4a2713aSLionel Sambuc _Complex float l3 = a0->iv0; 47*f4a2713aSLionel Sambuc _Complex float l4 = (a0->iv0 = a0->iv0); 48*f4a2713aSLionel Sambuc _Complex float l5 = a0->iv0; 49*f4a2713aSLionel Sambuc _Complex float l6 = (a0.p0 = a0.p0); 50*f4a2713aSLionel Sambuc _Complex float l7 = a0->iv0; 51*f4a2713aSLionel Sambuc _Complex float l8 = [a0 im0]; 52*f4a2713aSLionel Sambuc printf("l0: %.2f + %.2fi\n", __real l0, __imag l0); 53*f4a2713aSLionel Sambuc printf("l1: %.2f + %.2fi\n", __real l1, __imag l1); 54*f4a2713aSLionel Sambuc printf("l2: %.2f + %.2fi\n", __real l2, __imag l2); 55*f4a2713aSLionel Sambuc printf("l3: %.2f + %.2fi\n", __real l3, __imag l3); 56*f4a2713aSLionel Sambuc printf("l4: %.2f + %.2fi\n", __real l4, __imag l4); 57*f4a2713aSLionel Sambuc printf("l5: %.2f + %.2fi\n", __real l5, __imag l5); 58*f4a2713aSLionel Sambuc printf("l6: %.2f + %.2fi\n", __real l6, __imag l6); 59*f4a2713aSLionel Sambuc printf("l7: %.2f + %.2fi\n", __real l7, __imag l7); 60*f4a2713aSLionel Sambuc printf("l8: %.2f + %.2fi\n", __real l8, __imag l8); 61*f4a2713aSLionel Sambuc} 62