[AArch64] Fix SVE testsuite failures for ILP32 (PR 83846)
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / xorsign_exec.c
blob64bf8044cbd12c1cc744ff9b2a3308d71267bff0
1 /* { dg-do run } */
2 /* { dg-options "-O -ffast-math" } */
4 #include <math.h>
6 extern void abort(void);
8 static double x = 2.0;
9 static float y = 2.0;
11 int main()
13 if ((2.5 * __builtin_copysign(1.0d, x)) != 2.5)
14 abort();
16 if ((2.5 * __builtin_copysign(1.0f, y)) != 2.5)
17 abort();
19 if ((2.5 * __builtin_copysignf(1.0d, -x)) != -2.5)
20 abort();
22 if ((2.5 * __builtin_copysignf(1.0f, -y)) != -2.5)
23 abort();
25 return 0;