| 1 |
// PR middle-end/60597 |
| 2 |
// { dg-do compile } |
| 3 |
// { dg-options "-O2 -g" } |
| 4 |
|
| 5 |
typedef int int32_t __attribute__((mode (__SI__))); |
| 6 |
|
| 7 |
struct A |
| 8 |
{ |
| 9 |
int32_t foo () const; |
| 10 |
int32_t bar () const; |
| 11 |
int32_t a; |
| 12 |
}; |
| 13 |
|
| 14 |
struct B |
| 15 |
{ |
| 16 |
int32_t foo (); |
| 17 |
int32_t bar (); |
| 18 |
}; |
| 19 |
|
| 20 |
int32_t *c, d; |
| 21 |
|
| 22 |
int32_t |
| 23 |
A::foo () const |
| 24 |
{ |
| 25 |
int32_t b = a >> 16; |
| 26 |
return b; |
| 27 |
} |
| 28 |
|
| 29 |
int32_t |
| 30 |
A::bar () const |
| 31 |
{ |
| 32 |
int32_t b = a; |
| 33 |
return b; |
| 34 |
} |
| 35 |
|
| 36 |
void |
| 37 |
baz (A &x, B h, int32_t i, int32_t j) |
| 38 |
{ |
| 39 |
for (; i < h.bar (); ++i) |
| 40 |
for (; h.foo (); ++j) |
| 41 |
{ |
| 42 |
int32_t g = x.foo (); |
| 43 |
int32_t f = x.bar (); |
| 44 |
int32_t e = c[0] & 1; |
| 45 |
d = (e << 1) | (g << 16) | (f & 1); |
| 46 |
c[j] = 0; |
| 47 |
} |
| 48 |
} |