| 1 |
/* Test for ICE arising from VSX code generation. */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-O3 -mdejagnu-cpu=power7" } */ |
| 4 |
/* { dg-require-effective-target powerpc_vsx } */ |
| 5 |
|
| 6 |
struct timeval |
| 7 |
{ |
| 8 |
long tv_sec; |
| 9 |
long tv_usec; |
| 10 |
}; |
| 11 |
|
| 12 |
extern char *bar (struct timeval *); |
| 13 |
int *error; |
| 14 |
|
| 15 |
void |
| 16 |
foo (void *ptr) |
| 17 |
{ |
| 18 |
struct timeval tm; |
| 19 |
long n1, n2; |
| 20 |
|
| 21 |
if (!ptr) |
| 22 |
{ |
| 23 |
*error = 1; |
| 24 |
n1 = -1; |
| 25 |
n2 = -1; |
| 26 |
} |
| 27 |
else |
| 28 |
{ |
| 29 |
n1 = 0; |
| 30 |
n2 = *error; |
| 31 |
} |
| 32 |
|
| 33 |
tm.tv_sec = n1; |
| 34 |
tm.tv_usec = n2; |
| 35 |
|
| 36 |
if (*error) |
| 37 |
bar (&tm); |
| 38 |
} |