summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr47427.c
blob: 4f0b98e20c67f69e15f75997c943b754815520df (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
/* PR tree-optimization/47427 */

char *g, *h;

int
bar (unsigned char x, const int y)
{
lab:
  for (; h; g = h)
    for (g = 0; h; h++)
      {
	int a = 1;
	if (h)
	  {
	    if (a)
	      goto lab;
	    return y;
	  }
      }
  return x;
}

void
foo (void)
{
  if (bar (0, 1))
    bar (1, 0);
}