1 // RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o %t %s
2 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o %t %s
4 int printf(const char *, ...);
11 @property(assign) _Complex float p0;
13 -(_Complex float) im0;
14 -(void) setIm0: (_Complex float) a0;
21 self->iv0 = 5.0 + 2.0i;
25 -(_Complex float) im0 {
26 printf("im0: %.2f + %.2fi\n", __real iv0, __imag iv0);
27 return iv0 + (.1 + .2i);
29 -(void) setIm0: (_Complex float) a0 {
30 printf("setIm0: %.2f + %.2fi\n", __real a0, __imag a0);
31 iv0 = a0 + (.3 + .4i);
34 -(_Complex float) p0 {
35 printf("p0: %.2f + %.2fi\n", __real iv0, __imag iv0);
36 return iv0 + (.5 + .6i);
38 -(void) setP0: (_Complex float) a0 {
39 printf("setP0: %.2f + %.2fi\n", __real a0, __imag a0);
40 iv0 = a0 + (.7 + .8i);
45 float l0 = __real a0.im0;
46 float l1 = __imag a0->iv0;
47 _Complex float l2 = (a0.im0 = a0.im0);
48 _Complex float l3 = a0->iv0;
49 _Complex float l4 = (a0->iv0 = a0->iv0);
50 _Complex float l5 = a0->iv0;
51 _Complex float l6 = (a0.p0 = a0.p0);
52 _Complex float l7 = a0->iv0;
53 _Complex float l8 = [a0 im0];
54 printf("l0: %.2f + %.2fi\n", __real l0, __imag l0);
55 printf("l1: %.2f + %.2fi\n", __real l1, __imag l1);
56 printf("l2: %.2f + %.2fi\n", __real l2, __imag l2);
57 printf("l3: %.2f + %.2fi\n", __real l3, __imag l3);
58 printf("l4: %.2f + %.2fi\n", __real l4, __imag l4);
59 printf("l5: %.2f + %.2fi\n", __real l5, __imag l5);
60 printf("l6: %.2f + %.2fi\n", __real l6, __imag l6);
61 printf("l7: %.2f + %.2fi\n", __real l7, __imag l7);
62 printf("l8: %.2f + %.2fi\n", __real l8, __imag l8);