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
2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
opt
/
nrv17.C
blob
6248bca037af454f3eda98ce5e56a3e7cf67b060
1
// { dg-do run }
2
3
#include <cstdlib>
4
#include <complex>
5
6
void __attribute__((noinline))
7
h(std::complex<double> x)
8
{
9
if (x.real() != 2.0)
10
std::abort ();
11
}
12
13
void __attribute__((noinline))
14
g(std::complex<double> x)
15
{
16
if (x.real() != 0.5)
17
std::abort ();
18
}
19
20
void __attribute__((noinline))
21
f(std::complex<double> x)
22
{
23
h (x);
24
x = 1.0 / x;
25
g (x);
26
}
27
28
int main()
29
{
30
f(2.0);
31
return 0;
32
}