Debian Codegraph @

gcc/testsuite/c-c++-common/analyzer/malloc-ipa-4.c

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