1 // RUN: clang-cc -emit-llvm < %s
2 
3 int main(void)
4 {
5   double _Complex a = 5;
6   double _Complex b = 42;
7 
8   return a * b != b * a;
9 }
10 
11 _Complex double bar(int);
12 void test(_Complex double*);
13 void takecomplex(_Complex double);
14 
15 void test2(int c) {
16   _Complex double X;
17   X = bar(1);
18   test(&X);
19   takecomplex(X);
20 }
21 
22 _Complex double g1, g2;
23 _Complex float cf;
24 double D;
25 
26 void test3() {
27   g1 = g1 + g2;
28   g1 = g1 - g2;
29   g1 = g1 * g2;
30   g1 = +-~g1;
31 
32   double Gr = __real g1;
33 
34   cf += D;
35   // FIXME: Currently unsupported!
36   //D += cf;
37   cf /= g1;
38   g1 = g1 + D;
39   g1 = D + g1;
40 }
41 
42 void t1() {
43   (__real__ cf) = 4.0;
44 }
45 
46 void t2() {
47   (__imag__ cf) = 4.0;
48 }
49 
50 // PR1960
51 void t3() {
52   __complex__ long long v = 2;
53 }
54 
55 // PR3131
56 float _Complex t4();
57 
58 void t5() {
59   float _Complex x = t4();
60 }
61 
62