| 1 |
/* The same test as loop-3c.c. It failed on ia64 |
| 2 |
due to not handling of subreg in the lhs that is fixed. */ |
| 3 |
/* { dg-do run } */ |
| 4 |
/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" } */ |
| 5 |
|
| 6 |
|
| 7 |
#include <limits.h> |
| 8 |
extern void abort (void); |
| 9 |
|
| 10 |
void * a[255]; |
| 11 |
|
| 12 |
__attribute__ ((noinline)) |
| 13 |
void |
| 14 |
f (int m) |
| 15 |
{ |
| 16 |
int i; |
| 17 |
int sh = 0x100; |
| 18 |
i = m; |
| 19 |
do |
| 20 |
{ |
| 21 |
a[sh >>= 1] = ((unsigned)i << 3) + (char*)a; |
| 22 |
i += 4; |
| 23 |
} |
| 24 |
while (i < INT_MAX/2 + 1 + 4 * 4); |
| 25 |
} |
| 26 |
|
| 27 |
int |
| 28 |
main () |
| 29 |
{ |
| 30 |
a[0x10] = 0; |
| 31 |
a[0x08] = 0; |
| 32 |
f (INT_MAX/2 + INT_MAX/4 + 2); |
| 33 |
if (a[0x10] || a[0x08]) |
| 34 |
abort (); |
| 35 |
a[0x10] = 0; |
| 36 |
a[0x08] = 0; |
| 37 |
f (INT_MAX/2 + 1); |
| 38 |
if (! a[0x10] || a[0x08]) |
| 39 |
abort (); |
| 40 |
return 0; |
| 41 |
} |
| 42 |
|