aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/pr95240.c
blob: c84c64de8b838df53319270a00d66bae0dfcdbb5 (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
typedef __SIZE_TYPE__ size_t;

extern void *calloc(size_t nmemb, size_t size);
extern void free(void *ptr);

static char *activeTroubleArray;

int
initActiveTroubleArray ()
{
  activeTroubleArray = calloc (1, 1);
  return activeTroubleArray ? 0 : 1;
}

void
freeActiveTroubleArray ()
{
  free (activeTroubleArray);
}

int main (int argc, char *argv[])
{
  initActiveTroubleArray ();
  freeActiveTroubleArray ();

  return 1;
}