aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr107570.c
blob: ba5b535a867201b979270257078232e2b103b270 (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
/* { dg-do compile } */
/* { dg-options "-Os" } */

long int n;

void
foo (int *p, int x)
{
  for (;;)
    {
      for (*p = 0; *p < 1; ++*p)
        {
          n += *p < 0;
          if (n < x)
            {
              while (x < 1)
                ++x;

              __builtin_unreachable ();
            }
        }

      p = &x;
    }
}