1 /* { dg-do assemble } */
2 /* { dg-skip-if "" { pdp11-*-* } { "-O0" } { "" } } */
3
4 /* PR optimization/5892 */
5 typedef struct { unsigned long a; unsigned int b, c; } A;
6 typedef struct { unsigned long a; A *b; int c; } B;
7
8 static inline unsigned int
bar(unsigned int x)9 bar (unsigned int x)
10 {
11 unsigned long r;
12 asm ("" : "=r" (r) : "0" (x));
13 return r >> 31;
14 }
15
foo(B * x)16 int foo (B *x)
17 {
18 A *y;
19 y = x->b;
20 y->b = bar (x->c);
21 y->c = ({ unsigned int z = 1; (z << 24) | (z >> 24); });
22 }
23