PR ipa/61602
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / fp-int-convert-float128-timode-2.c
blob9990e190c60239007f8c6df4030d2454874e797c
1 /* Test floating-point conversions. __float128 type with TImode: bug
2 53317. */
3 /* Origin: Joseph Myers <joseph@codesourcery.com> */
4 /* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
5 /* { dg-require-effective-target int128 } */
6 /* { dg-options "" } */
8 extern void abort (void);
9 extern void exit (int);
11 int
12 main (void)
14 volatile unsigned long long a = 0x1000000000000ULL;
15 volatile unsigned long long b = 0xffffffffffffffffULL;
16 unsigned __int128 c = (((unsigned __int128) a) << 64) | b;
17 __float128 d = c;
18 if (d != 0x1.000000000000ffffffffffffffffp112q)
19 abort ();
20 exit (0);