[RS6000] Tests that use int128_t and -m32
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / bfp / scalar-cmp-exp-lt-3.c
blob696e44734075ed9a869d4cb1bd3c3a0d142ff7f4
1 /* { dg-do run { target { powerpc*-*-* } } } */
2 /* { dg-require-effective-target p9vector_hw } */
3 /* { dg-options "-mdejagnu-cpu=power9" } */
5 /* This test should succeed on 32-bit and 64-bit configurations. */
6 #include <altivec.h>
7 #include <stdlib.h>
9 int
10 compare_exponents_lt (double *exponent1_p, double *exponent2_p)
12 double exponent1 = *exponent1_p;
13 double exponent2 = *exponent2_p;
15 return scalar_cmp_exp_lt (exponent1, exponent2);
18 int
19 main ()
21 double x = (double) (0x1100LL << 50);
22 double y = (double) (0x1101LL << 50);
23 double z = (double) (0x1101LL << 37);
25 if (compare_exponents_lt (&x, &y))
26 abort ();
27 if (!compare_exponents_lt (&z, &x))
28 abort ();
29 return 0;