| 1 |
/* { dg-lto-do run } */ |
| 2 |
/* { dg-lto-options { { -O0 -flto -fno-math-errno } } } */ |
| 3 |
/* { dg-lto-options { "-O0 -flto -fno-math-errno -mfpu=neon-vfpv4" } { target arm*-*-* } } */ |
| 4 |
/* { dg-require-effective-target arm_neon_ok_no_float_abi { target arm*-*-* } } */ |
| 5 |
/* { dg-require-linker-plugin "" } */ |
| 6 |
/* { dg-require-effective-target sqrt_insn } */ |
| 7 |
|
| 8 |
/* We require a linker plugin because otherwise we'd need to link |
| 9 |
against libm which we are not sure here has cabs on all targets. |
| 10 |
This is because collect2 invokes ld on the -O0 object code |
| 11 |
which does not have folded cabs. */ |
| 12 |
|
| 13 |
double cabs(_Complex double); |
| 14 |
double __attribute__((used)) __attribute__ ((optimize ("O2,fast-math"))) |
| 15 |
foo (_Complex double x, int b) |
| 16 |
{ |
| 17 |
if (b) |
| 18 |
x = 0; |
| 19 |
return cabs(x); |
| 20 |
} |
| 21 |
|
| 22 |
int main() { return 0; } |