aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr107997.c
blob: 89e1fd349c3db46dcc764fc980524e1eefbf8e6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* PR tree-optimization/107997 */

int a, b;
void bar (int);
int baz (void);

void *
foo (int x, void *y)
{
  asm goto ("" : : "r" (x || !a) : : l);
l:
  if (y)
    return 0;
  bar (b ? b : x);
  while (x--)
    {
      if (!baz ())
	baz ();
      asm goto ("" : : : : l2);
    l2:;
    }
  return y;
}