aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr101885.c
blob: 05fd0ed30808782ad1f2d370bcee58546a477c8b (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
/* { dg-do run } */
/* { dg-options "-O3" } */
int a = 3, c;
short b = 5, d, f;
volatile short e;

__attribute__((noipa)) void
foo (void)
{
}

int
main ()
{
  for (f = 0; f != 2; f++)
    {
      int g = a;
      if (b)
	if (a)
	  for (a = b = 0; b <= 3; b++)
	    ;
      for (c = 0; c != 16; ++c)
	e;
    }
  b = d;
  foo ();
  if (a != 0)
    __builtin_abort ();
  return 0;
}