OSDN Git Service

* gcc.c-torture/compile/20080625-1.c: Skip for M32C.
[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 } */
4 /* { dg-xfail-if "" { m6811-*-* m6812-*-* } { "*" } { "" } } */
5
6 /* PR optimization/5892 */
7 typedef struct { unsigned long a; unsigned int b, c; } A;
8 typedef struct { unsigned long a; A *b; int c; } B;
9
10 static inline unsigned int
11 bar (unsigned int x)
12 {
13   unsigned long r;
14   asm ("" : "=r" (r) : "0" (x));
15   return r >> 31;
16 }
17
18 int foo (B *x)
19 {
20   A *y;
21   y = x->b;
22   y->b = bar (x->c);
23   y->c = ({ unsigned int z = 1; (z << 24) | (z >> 24); });
24 }