aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr111917.c
blob: 532e30200b59ceea64c80e0fbe57de08556689c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-do compile } */
/* { dg-additional-options "-funswitch-loops" } */

long t;
long a() {
  long b = t, c = t;
  for (; b < 31; b++)
    c <<= 1;
  return c;
}
long t1;
static
int d() {
  if (!t1)
    return 0;
e:
f:
  for (; a();)
    ;
  goto f;
  return 0;
}
int main() { d(); }