| 1 |
/* PR target/11965 */ |
| 2 |
/* Originator: <[email protected]> */ |
| 3 |
|
| 4 |
/* { dg-do run } */ |
| 5 |
/* { dg-require-effective-target ultrasparc_hw } */ |
| 6 |
/* { dg-options "-O -mcpu=ultrasparc" } */ |
| 7 |
|
| 8 |
/* This used to fail on 32-bit Ultrasparc because GCC emitted |
| 9 |
an invalid shift instruction. */ |
| 10 |
|
| 11 |
|
| 12 |
static inline unsigned int shift(int n, unsigned int value) |
| 13 |
{ |
| 14 |
return value << n; |
| 15 |
} |
| 16 |
|
| 17 |
unsigned int val = 1; |
| 18 |
|
| 19 |
int main(void) |
| 20 |
{ |
| 21 |
int i; |
| 22 |
|
| 23 |
for (i = 0; i < 4; i++) |
| 24 |
val = shift(32, val); |
| 25 |
|
| 26 |
return 0; |
| 27 |
} |