| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-mdejagnu-cpu=power8 -Os -w" } */ |
| 3 |
/* { dg-additional-options "-mbig" { target powerpc64le-*-* } } */ |
| 4 |
|
| 5 |
/* Verify that we don't ICE. */ |
| 6 |
|
| 7 |
int a; |
| 8 |
static _Atomic long double b, c, d, m; |
| 9 |
double n; |
| 10 |
extern int foo (void); |
| 11 |
extern void bar (int, int, int, int); |
| 12 |
|
| 13 |
void |
| 14 |
bug (void) |
| 15 |
{ |
| 16 |
b = 1.79769313486231580793728971405301199e308L; |
| 17 |
for (int i = 0; i < 10000; i++) |
| 18 |
if (__builtin_isinf (n)) |
| 19 |
b; |
| 20 |
c = 1; |
| 21 |
int e, f, g, h; |
| 22 |
while (a) |
| 23 |
; |
| 24 |
for (int i; i; i++) |
| 25 |
{ |
| 26 |
double j = c /= foo (); |
| 27 |
if (__builtin_isinf (j)) |
| 28 |
{ |
| 29 |
if (foo == 1 << 31) |
| 30 |
e++; |
| 31 |
f++; |
| 32 |
c = 0; |
| 33 |
} |
| 34 |
else |
| 35 |
{ |
| 36 |
if (foo == 1 << 30) |
| 37 |
g++; |
| 38 |
h++; |
| 39 |
c = 1; |
| 40 |
} |
| 41 |
} |
| 42 |
bar (e, f, g, h); |
| 43 |
d = 1.79769313486231580793728971405301199e308L; |
| 44 |
m = 1; |
| 45 |
} |