1 // RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -o %t %s
2 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-llvm -o %t %s
9 @property(assign) _Complex float p0;
11 -(_Complex float) im0;
12 -(void) setIm0: (_Complex float) a0;
19 self->iv0 = 5.0 + 2.0i;
23 -(_Complex float) im0 {
24 printf("im0: %.2f + %.2fi\n", __real iv0, __imag iv0);
25 return iv0 + (.1 + .2i);
27 -(void) setIm0: (_Complex float) a0 {
28 printf("setIm0: %.2f + %.2fi\n", __real a0, __imag a0);
29 iv0 = a0 + (.3 + .4i);
32 -(_Complex float) p0 {
33 printf("p0: %.2f + %.2fi\n", __real iv0, __imag iv0);
34 return iv0 + (.5 + .6i);
36 -(void) setP0: (_Complex float) a0 {
37 printf("setP0: %.2f + %.2fi\n", __real a0, __imag a0);
38 iv0 = a0 + (.7 + .8i);
43 float l0 = __real a0.im0;
44 float l1 = __imag a0->iv0;
45 _Complex float l2 = (a0.im0 = a0.im0);
46 _Complex float l3 = a0->iv0;
47 _Complex float l4 = (a0->iv0 = a0->iv0);
48 _Complex float l5 = a0->iv0;
49 _Complex float l6 = (a0.p0 = a0.p0);
50 _Complex float l7 = a0->iv0;
51 _Complex float l8 = [a0 im0];
52 printf("l0: %.2f + %.2fi\n", __real l0, __imag l0);
53 printf("l1: %.2f + %.2fi\n", __real l1, __imag l1);
54 printf("l2: %.2f + %.2fi\n", __real l2, __imag l2);
55 printf("l3: %.2f + %.2fi\n", __real l3, __imag l3);
56 printf("l4: %.2f + %.2fi\n", __real l4, __imag l4);
57 printf("l5: %.2f + %.2fi\n", __real l5, __imag l5);
58 printf("l6: %.2f + %.2fi\n", __real l6, __imag l6);
59 printf("l7: %.2f + %.2fi\n", __real l7, __imag l7);
60 printf("l8: %.2f + %.2fi\n", __real l8, __imag l8);