Debian Codegraph @

gcc/testsuite/c-c++-common/analyzer/malloc-5.c

raw
1 /* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
2
3 #include <stdlib.h>
4
5 void test (void)
6 {
7 void *p = malloc (sizeof (int));
8 if (!p)
9 return;
10 int *q = (int *) p;
11 if (!q)
12 return;
13 free (q);
14 }