aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/pr113505.c
blob: 58a2b6cd6f44f00520cac661bc739592bd43e01b (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 analyzer/113505 */
/* { dg-additional-options "-O -fdump-analyzer" } */

enum E **foo () __attribute__((__const__));
char a[2];
void bar (char *);

void
baz (void)
{
  char *s, *l;
  for (;;)
    {
      bar (a);
      s = a;
      while (foo ()[*s])
	s++;
      l = s;
      *l++ = '\0';
      while (foo ()[*l])
	l++;
      bar (s);
    }
}