annotate gcc/testsuite/gcc.dg/lto/20110201-1_0.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-lto-do run } */
kono
parents:
diff changeset
2 /* { dg-lto-options { { -O0 -flto -fno-math-errno } } } */
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
3 /* { dg-lto-options { "-O0 -flto -fno-math-errno -mfpu=neon-vfpv4" } { target arm*-*-* } } */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
4 /* { dg-require-effective-target arm_neon_ok_no_float_abi { target arm*-*-* } } */
111
kono
parents:
diff changeset
5 /* { dg-require-linker-plugin "" } */
kono
parents:
diff changeset
6 /* { dg-require-effective-target sqrt_insn } */
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 /* We require a linker plugin because otherwise we'd need to link
kono
parents:
diff changeset
9 against libm which we are not sure here has cabs on all targets.
kono
parents:
diff changeset
10 This is because collect2 invokes ld on the -O0 object code
kono
parents:
diff changeset
11 which does not have folded cabs. */
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 double cabs(_Complex double);
kono
parents:
diff changeset
14 double __attribute__((used)) __attribute__ ((optimize ("O2,fast-math")))
kono
parents:
diff changeset
15 foo (_Complex double x, int b)
kono
parents:
diff changeset
16 {
kono
parents:
diff changeset
17 if (b)
kono
parents:
diff changeset
18 x = 0;
kono
parents:
diff changeset
19 return cabs(x);
kono
parents:
diff changeset
20 }
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 int main() { return 0; }