* Mainline merge as of 2006-02-16 (@111136).
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / 20041119-1.c
blob3e0e565f406ae0ecbf03dfb47fd0aa2d51a25218
1 /* PR rtl-optimization/17825 */
2 #ifdef __i386__
3 register unsigned int reg __asm ("esi");
4 #elif defined __x86_64__
5 register unsigned int reg __asm ("r14");
6 #else
7 unsigned int reg;
8 #endif
10 struct S
12 unsigned int h[8];
13 } *b;
14 unsigned int c;
15 void foo (int);
17 void
18 bar (void)
20 unsigned int j, k, l, m;
22 j = (reg & 0xffff) | ((b->h[2] & 0xffff) << 16);
23 k = c & 0xffff;
24 if (k == 0)
25 foo (0);
26 l = (j / k) & 0xffff;
27 m = (j % k) & 0xffff;
28 reg = (reg & 0xffff0000) | l;
29 b->h[2] = (b->h[2] & 0xffff0000) | m;