Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / pr102224.c
blob9f09ba5ccbb7b066be3c3a2787057c4a3e8fc676
1 /* PR target/102224 */
2 /* { dg-do run } */
3 /* { dg-options "-O2" } */
5 __attribute__((noipa)) float
6 foo (float x)
8 return x * __builtin_copysignf (1.0f, x);
11 __attribute__((noipa)) float
12 bar (float x, float y)
14 return x * __builtin_copysignf (1.0f, y);
17 __attribute__((noipa)) float
18 baz (float z, float x)
20 return x * __builtin_copysignf (1.0f, x);
23 __attribute__((noipa)) float
24 qux (float z, float x, float y)
26 return x * __builtin_copysignf (1.0f, y);
29 int
30 main ()
32 if (foo (1.0f) != 1.0f
33 || foo (-4.0f) != 4.0f)
34 __builtin_abort ();
35 if (bar (1.25f, 7.25f) != 1.25f
36 || bar (1.75f, -3.25f) != -1.75f
37 || bar (-2.25f, 7.5f) != -2.25f
38 || bar (-3.0f, -4.0f) != 3.0f)
39 __builtin_abort ();
40 if (baz (5.5f, 1.0f) != 1.0f
41 || baz (4.25f, -4.0f) != 4.0f)
42 __builtin_abort ();
43 if (qux (1.0f, 1.25f, 7.25f) != 1.25f
44 || qux (2.0f, 1.75f, -3.25f) != -1.75f
45 || qux (3.0f, -2.25f, 7.5f) != -2.25f
46 || qux (4.0f, -3.0f, -4.0f) != 3.0f)
47 __builtin_abort ();
48 return 0;