Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/ext/complex3.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 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 } |