Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / g++.dg / ext / complex3.C
blob062c2d44bed7c356784184ffaeb812524615bf6a
1 // PR c++/31780
2 // { dg-do run }
3 // { dg-options "" }
5 // Test that we can implicitly convert to _Complex, but that it's worse
6 // than a scalar arithmetic conversion.
8 extern "C" void exit (int);
10 int r = 0;
12 void f (_Complex int) { ++r; }
13 void f (double) { }
15 void g (_Complex int) { }
17 int main()
19   f (1);
20   g (1);
22   return r;
25 void bar()
27   r ? 0i : 0;