repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge -r 127928:132243 from trunk
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ext
/
complex3.C
blob
062c2d44bed7c356784184ffaeb812524615bf6a
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
}