Debian Codegraph @

gcc/testsuite/g++.dg/ext/complex3.C

raw
1 // PR c++/31780
2 // { dg-do run }
3 // { dg-options "" }
4
5 // Test that we can implicitly convert to _Complex, but that it's worse
6 // than a scalar arithmetic conversion.
7
8 extern "C" void exit (int);
9
10 int r = 0;
11
12 void f (_Complex int) { ++r; }
13 void f (double) { }
14
15 void g (_Complex int) { }
16
17 int main()
18 {
19 f (1);
20 g (1);
21
22 return r;
23 }
24
25 void bar()
26 {
27 r ? 0i : 0;
28 }