| 1 |
/* Check that the inlined mem load is not handled as unaligned load. */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-O2" } */ |
| 4 |
/* { dg-final { scan-assembler-not "shll|extu|or" } } */ |
| 5 |
|
| 6 |
static inline int |
| 7 |
readint0 (int* x) |
| 8 |
{ |
| 9 |
return *x; |
| 10 |
} |
| 11 |
|
| 12 |
int |
| 13 |
test0 (int* x) |
| 14 |
{ |
| 15 |
return readint0 (x); |
| 16 |
} |
| 17 |
|
| 18 |
inline int |
| 19 |
readint1 (int* x) |
| 20 |
{ |
| 21 |
return *x; |
| 22 |
} |
| 23 |
|
| 24 |
int |
| 25 |
test1 (int* x) |
| 26 |
{ |
| 27 |
return readint1 (x); |
| 28 |
} |
| 29 |
|
| 30 |
static int |
| 31 |
readint2 (int* x) |
| 32 |
{ |
| 33 |
return *x; |
| 34 |
} |
| 35 |
|
| 36 |
int |
| 37 |
test2 (int* x) |
| 38 |
{ |
| 39 |
return readint2 (x); |
| 40 |
} |