1 /* Test infinities convert to __float128 infinity. Bug 77265. */
3 /* { dg-require-effective-target __float128 } */
4 /* { dg-require-effective-target base_quadfloat_support } */
5 /* { dg-add-options __float128 } */
7 extern void abort (void);
8 extern void exit (int);
10 volatile float finf
= __builtin_inff ();
11 volatile double dinf
= __builtin_inf ();
12 volatile long double ldinf
= __builtin_infl ();
13 volatile float nfinf
= -__builtin_inff ();
14 volatile double ndinf
= -__builtin_inf ();
15 volatile long double nldinf
= -__builtin_infl ();
20 volatile __float128 r
;
21 r
= (__float128
) finf
;
22 if (!__builtin_isinf (r
) || __builtin_signbit (r
) != 0)
24 r
= (__float128
) dinf
;
25 if (!__builtin_isinf (r
) || __builtin_signbit (r
) != 0)
27 r
= (__float128
) ldinf
;
28 if (!__builtin_isinf (r
) || __builtin_signbit (r
) != 0)
30 r
= (__float128
) nfinf
;
31 if (!__builtin_isinf (r
) || __builtin_signbit (r
) == 0)
33 r
= (__float128
) ndinf
;
34 if (!__builtin_isinf (r
) || __builtin_signbit (r
) == 0)
36 r
= (__float128
) nldinf
;
37 if (!__builtin_isinf (r
) || __builtin_signbit (r
) == 0)