| 1 |
/* PR target/14209. Bug in cris.md, shrinking access size of |
| 2 |
postincrement. |
| 3 |
Origin: <[email protected]>. */ |
| 4 |
|
| 5 |
void abort (void); |
| 6 |
void exit (int); |
| 7 |
|
| 8 |
long int xb (long int *y) __attribute__ ((__noinline__)); |
| 9 |
long int xw (long int *y) __attribute__ ((__noinline__)); |
| 10 |
short int yb (short int *y) __attribute__ ((__noinline__)); |
| 11 |
|
| 12 |
long int xb (long int *y) |
| 13 |
{ |
| 14 |
long int xx = *y & 255; |
| 15 |
return xx + y[1]; |
| 16 |
} |
| 17 |
|
| 18 |
long int xw (long int *y) |
| 19 |
{ |
| 20 |
long int xx = *y & 65535; |
| 21 |
return xx + y[1]; |
| 22 |
} |
| 23 |
|
| 24 |
short int yb (short int *y) |
| 25 |
{ |
| 26 |
short int xx = *y & 255; |
| 27 |
return xx + y[1]; |
| 28 |
} |
| 29 |
|
| 30 |
int main (void) |
| 31 |
{ |
| 32 |
long int y[] = {-1, 16000}; |
| 33 |
short int yw[] = {-1, 16000}; |
| 34 |
|
| 35 |
if (xb (y) != 16255 |
| 36 |
|| xw (y) != 81535 |
| 37 |
|| yb (yw) != 16255) |
| 38 |
abort (); |
| 39 |
exit (0); |
| 40 |
} |