summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/20041119-1.c
blob: 3e0e565f406ae0ecbf03dfb47fd0aa2d51a25218 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* PR rtl-optimization/17825 */
#ifdef __i386__
register unsigned int reg __asm ("esi");
#elif defined __x86_64__
register unsigned int reg __asm ("r14");
#else
unsigned int reg;
#endif

struct S
{
  unsigned int h[8];
} *b;
unsigned int c;
void foo (int);

void
bar (void)
{
  unsigned int j, k, l, m;

  j = (reg & 0xffff) | ((b->h[2] & 0xffff) << 16);
  k = c & 0xffff;
  if (k == 0)
    foo (0);
  l = (j / k) & 0xffff;
  m = (j % k) & 0xffff;
  reg = (reg & 0xffff0000) | l;
  b->h[2] = (b->h[2] & 0xffff0000) | m;
}