aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr57214.c
blob: c697f84514ea95ec6dbf8434840788323c7f4e89 (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
/* { dg-do compile } */

extern int baz (void);
extern int foo (void) __attribute__ ((returns_twice));

void
bar (_Bool b)
{
  int buf[1];
  while (1)
    {
      _Bool x = 1;
      if (b)
	baz ();
      b = 1;
      baz ();
      x = 0;
      unsigned int i;
      while (buf[i] && i)
	i++;
      foo ();
      if (!x)
	b = 0;
    }
}