| 1 |
/* Skip this on aix, since it takes soft-float and long-double-128 |
| 2 |
incompatible and warns it. */ |
| 3 |
/* { dg-skip-if "aix long-double-128 soft-float" { powerpc*-*-aix* } } */ |
| 4 |
/* { dg-options "-mlong-double-128 -msoft-float" } */ |
| 5 |
|
| 6 |
/* Verify there is no ICE. */ |
| 7 |
|
| 8 |
#include <stddef.h> |
| 9 |
#include <stdlib.h> |
| 10 |
#include <math.h> |
| 11 |
|
| 12 |
#define PACK __builtin_pack_ibm128 |
| 13 |
#define UNPACK __builtin_unpack_ibm128 |
| 14 |
#define LDOUBLE __ibm128 |
| 15 |
|
| 16 |
extern LDOUBLE bar (LDOUBLE); |
| 17 |
|
| 18 |
int |
| 19 |
main (void) |
| 20 |
{ |
| 21 |
double high = pow (2.0, 60); |
| 22 |
double low = 2.0; |
| 23 |
LDOUBLE a = ((LDOUBLE) high) + ((LDOUBLE) low); |
| 24 |
double x0 = UNPACK (a, 0); |
| 25 |
double x1 = UNPACK (a, 1); |
| 26 |
LDOUBLE b = PACK (x0, x1); |
| 27 |
LDOUBLE c = bar (b); |
| 28 |
|
| 29 |
return c > a; |
| 30 |
} |
| 31 |
|