OSDN Git Service

* c-decl.c (pushdecl): When an extern declaration at block scope
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / compile / 20020312-1.c
1 /* This does not compile on HC11/HC12 due to the asm which requires
2    two 32-bit registers.  */
3 /* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */
4
5 /* PR optimization/5892 */
6 typedef struct { unsigned long a; unsigned int b, c; } A;
7 typedef struct { unsigned long a; A *b; int c; } B;
8
9 static inline unsigned int
10 bar (unsigned int x)
11 {
12   unsigned long r;
13   asm ("" : "=r" (r) : "0" (x));
14   return r >> 31;
15 }
16
17 int foo (B *x)
18 {
19   A *y;
20   y = x->b;
21   y->b = bar (x->c);
22   y->c = ({ unsigned int z = 1; (z << 24) | (z >> 24); });
23 }