PR tree-optimization/84740
[official-gcc.git] / gcc / testsuite / gcc.dg / lto / 20110201-1_0.c
blob871a49fe1897511e39827b96c7c57931d689ce92
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 } */
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. */
13 double cabs(_Complex double);
14 double __attribute__((used)) __attribute__ ((optimize ("O2,fast-math")))
15 foo (_Complex double x, int b)
17 if (b)
18 x = 0;
19 return cabs(x);
22 int main() { return 0; }