summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr20742.c
blob: 21d6eb63c8ccb9fbf8b09b27ecea57fa7c32e0ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options "-O2" } */

#define TEN(x) x x x x x x x x x x
#define THOUSAND(x) TEN (TEN (TEN (x)))

int
foo (int x, int y)
{
  register int a = y + 57;
  register int b = y + 31;

  while (x-- > 0)
    {
      THOUSAND (a += b; b -= a;)
    }
  return a + b;
}