summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr33434-1.c
blob: d646ff74d227fd853aaf5488a9f17a0e72b7331d (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
/* PR tree-optimization/33434 */
/* { dg-do run } */
/* { dg-options "-O2" } */

int k;

void f1 (int a, int b)
{
  a = 1;
  b = 1;
  if (a)
    while (b --)
      k = 1;
  else
    if (b != 1)
      __builtin_abort ();
}

int main (void)
{
  f1 (1, 1);
  if (k != 1)
    __builtin_abort ();
  return 0;
}