| 1 |
/* PR target/pr68400 |
| 2 |
This was triggering an ICE in change_address_1 when compiled with -Os. */ |
| 3 |
|
| 4 |
/* { dg-do compile } */ |
| 5 |
/* { dg-options "-fstack-protector -mips16" } */ |
| 6 |
|
| 7 |
typedef struct s { |
| 8 |
unsigned long long d; |
| 9 |
long long t; |
| 10 |
} p; |
| 11 |
|
| 12 |
int sh(int x, unsigned char *buf) |
| 13 |
{ |
| 14 |
p *uhdr = (p *)buf; |
| 15 |
unsigned int i = 0; |
| 16 |
uhdr->d = ((uhdr->d & 0xff00000000000000LL) >> 56) |
| 17 |
| ((uhdr->d & 0x0000ff0000000000LL) >> 24) |
| 18 |
| ((uhdr->d & 0x00000000ff000000LL) << 8) |
| 19 |
| ((uhdr->d & 0x00000000000000ffLL) << 56); |
| 20 |
uhdr->t = ((uhdr->t & 0xff00000000000000LL) >> 56) |
| 21 |
| ((uhdr->t & 0x0000ff0000000000LL) >> 24) |
| 22 |
| ((uhdr->t & 0x000000ff00000000LL) >> 8) |
| 23 |
| ((uhdr->t & 0x00000000ff000000LL) << 8) |
| 24 |
| ((uhdr->t & 0x000000000000ff00LL) << 40) |
| 25 |
| ((uhdr->t & 0x00000000000000ffLL) << 56); |
| 26 |
i += 4; |
| 27 |
if (x < i) return 0; else return 1; |
| 28 |
} |