[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr105334.c
blob7664e033dd0dfdb415db85dadfb6b3463fecc01f
1 /* Skip this on aix, since it takes soft-float and long-double-128
2 incompatible and warns it. */
3 /* { dg-skip-if "aix long-double-128 soft-float" { powerpc*-*-aix* } } */
4 /* { dg-options "-mlong-double-128 -msoft-float" } */
6 /* Verify there is no ICE. */
8 #include <stddef.h>
9 #include <stdlib.h>
10 #include <math.h>
12 #define PACK __builtin_pack_ibm128
13 #define UNPACK __builtin_unpack_ibm128
14 #define LDOUBLE __ibm128
16 extern LDOUBLE bar (LDOUBLE);
18 int
19 main (void)
21 double high = pow (2.0, 60);
22 double low = 2.0;
23 LDOUBLE a = ((LDOUBLE) high) + ((LDOUBLE) low);
24 double x0 = UNPACK (a, 0);
25 double x1 = UNPACK (a, 1);
26 LDOUBLE b = PACK (x0, x1);
27 LDOUBLE c = bar (b);
29 return c > a;