summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr67465.c
blob: 321fd38ccaffc2ce72c69760903f419f589bece5 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* { dg-do run } */
/* { dg-options "-O3 -std=gnu99" } */

int a, b, c, d, e, h;

int
fn1 (int p1)
{
  {
    int g[2];
    for (int i = 0; i < 1; i++)
      g[i] = 0;
    if (g[0] < c)
      {
	a = (unsigned) (1 ^ p1) % 2;
	return 0;
      }
  }
  return 0;
}

void
fn2 ()
{
  for (h = 0; h < 1; h++)
    {
      for (int j = 0; j < 2; j++)
	{
	  for (b = 1; b; b = 0)
	    a = 1;
	  for (; b < 1; b++)
	    ;
	  if (e)
	    continue;
	  a = 2;
	}
      fn1 (h);
      short k = -16;
      d = k > a;
    }
}

int
main ()
{
  fn2 ();

  if (a != 2)
    __builtin_abort ();

  return 0;
}