aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/pr94754.c
blob: 3fae20c33d03a658fe0bd39deabfd0459ea039de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[[gnu::nonnull]]
static
void init_x(int cond, int **x, int *y)
{
  if (!cond)
    return;
  *x = y;
}

int foo(int cond)
{
  int *x;
  int y = 7;

  if (cond < 2)
    return -1;
  init_x(cond, &x, &y);

  return *x;
}