Debian Codegraph @

gcc/testsuite/c-c++-common/analyzer/malloc-paths-6.c

raw
1 /* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
2
3 #include <stdlib.h>
4
5 void test (void *ptr)
6 {
7 void *q;
8 q = ptr;
9 free (ptr);
10 free (q); /* { dg-warning "double-'free' of 'q'" } */
11 /* The above case requires us to handle equivalence classes in
12 state transitions. */
13 }