aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/call-summaries-pr114473.c
blob: 4598840f0dff7fe34f76ddf61c7122f2c23bafe7 (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
26
27
28
29
30
31
/* { dg-additional-options "-fanalyzer-call-summaries" } */

int a;
extern int *q[];

int *
baz (int *src)
{
  while (a)
    {
      src && a;
      return src;
    }
}

void
bar (int **src)
{
  for (unsigned j = 0; j;)
    a = 0;
  while (a)
    baz (src[0]);
}

void
foo (void)
{
  bar (q);
  baz (&a);
  bar (q);
}