Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / fp-int-convert-timode-1.c
blob971a5985357ce50e187d3dea2660804c8055e141
1 /* Test for correct rounding of conversions from __int128 to
2 float. */
3 /* { dg-do run } */
4 /* { dg-require-effective-target int128 } */
5 /* { dg-options "-frounding-math" } */
7 #include <stdlib.h>
9 int
10 main (void)
12 volatile unsigned long long h = 0x8000000000000000LL;
13 volatile unsigned long long l = 0xdLL;
14 volatile unsigned __int128 u128 = (((unsigned __int128) h) << 64) | l;
15 volatile __int128 s128 = u128;
16 float fs = s128;
17 if (fs != -0x1p+127)
18 abort ();
19 double ds = s128;
20 if (ds != -0x1p+127)
21 abort ();
22 exit (0);