| 1 |
/* PR tree-optimization/54919 */ |
| 2 |
/* Testcase by Zdenek Sojka <[email protected]> */ |
| 3 |
|
| 4 |
/* { dg-do run } */ |
| 5 |
/* { dg-options "-O3 -ffast-math -funroll-loops -fvariable-expansion-in-unroller" } */ |
| 6 |
|
| 7 |
int a[10]; |
| 8 |
extern void abort(void) __attribute__((noreturn)); |
| 9 |
|
| 10 |
int __attribute__((__noinline__, __noclone__)) |
| 11 |
foo (void) |
| 12 |
{ |
| 13 |
double d; |
| 14 |
int i; |
| 15 |
for (i = 0, d = 0; i < 64; i++) |
| 16 |
d--; |
| 17 |
return (int) d; |
| 18 |
} |
| 19 |
|
| 20 |
int |
| 21 |
main (void) |
| 22 |
{ |
| 23 |
if (foo () != -64) |
| 24 |
abort (); |
| 25 |
return 0; |
| 26 |
} |
| 27 |
|