summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr88870.c
blob: 81f686bd972cd9b9b3f2c815eef3206f58170160 (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
/* PR rtl-optimization/88870 */
/* { dg-do compile } */
/* { dg-require-effective-target nonlocal_goto } */
/* { dg-options "-O1 -fexceptions -fnon-call-exceptions -ftrapv -fno-tree-dominator-opts" } */

int a, b;

void
foo (int *x)
{
  int c = 0;
  {
    int d;
    x = &c;
    for (;;)
      {
        x = &d;
        b = 0;
        d = c + 1;
        b = c = 1;
        ++a;
      }
  }
}