aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/20020312-1.c
blob: 9f61dae64a576cef42f37e36b8cf8f0e2f14f483 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* PR optimization/5892 */
typedef struct { unsigned long a; unsigned int b, c; } A;
typedef struct { unsigned long a; A *b; int c; } B;

static inline unsigned int
bar (unsigned int x)
{
  unsigned long r;
  asm ("" : "=r" (r) : "0" (x));
  return r >> 31;
}

int foo (B *x)
{
  A *y;
  y = x->b;
  y->b = bar (x->c);
  y->c = ({ unsigned int z = 1; (z << 24) | (z >> 24); });
}