PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / copy-sign-1.c
blobde3e7b242ceb7b76262456e899615da4b1bd5291
1 /* { dg-do compile } */
2 /* { dg-require-effective-target c99_runtime } */
3 /* { dg-options "-O2 -ffast-math -fdump-tree-gimple" } */
4 /* { dg-add-options c99_runtime } */
5 float f(float x)
7 return (x > 0.f ? -1.f : 1.f);
9 float f1(float x)
11 return (x > 0.f ? 1.f : -1.f);
13 float g(float x)
15 return (x >= 0.f ? -1.f : 1.f);
17 float g1(float x)
19 return (x >= 0.f ? 1.f : -1.f);
21 float h(float x)
23 return (x < 0.f ? -1.f : 1.f);
25 float h1(float x)
27 return (x < 0.f ? 1.f : -1.f);
29 float i(float x)
31 return (x <= 0.f ? -1.f : 1.f);
33 float i1(float x)
35 return (x <= 0.f ? 1.f : -1.f);
37 /* { dg-final { scan-tree-dump-times "copysign" 8 "gimple"} } */