[RS6000] Tests that use int128_t and -m32
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / bfp / scalar-extract-sig-6.c
blobc85072da1381620b00a58d59670b9e25e576cd56
1 /* { dg-do run { target { powerpc*-*-* } } } */
2 /* { dg-require-effective-target lp64 } */
3 /* { dg-require-effective-target p9vector_hw } */
4 /* { dg-options "-mdejagnu-cpu=power9" } */
6 /* This test should succeed only on 64-bit configurations. */
7 #include <altivec.h>
8 #include <stdlib.h>
10 unsigned long long int
11 get_significand (double *p)
13 double source = *p;
15 return scalar_extract_sig (source);
18 int
19 main ()
21 double x = (double) (0x1100LL << 50);
22 double z = (double) (0x1101LL << 37);
24 if (get_significand (&x) != 0x11000000000000ULL)
25 abort ();
26 if (get_significand (&z) != 0x11010000000000ULL)
27 abort ();
28 return 0;