Debian Codegraph @

gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-lto-c.c

raw
1 /* { dg-do link } */
2 /* { dg-require-effective-target lto } */
3 /* { dg-additional-options "-flto" } */
4 /* { dg-additional-sources "malloc-ipa-8-lto-a.c malloc-ipa-8-lto-b.c" } */
5
6 #include <stdlib.h>
7 #include "malloc-ipa-8-lto.h"
8
9 void test (int i)
10 {
11 boxed_int *obj = make_boxed_int (i);
12
13 free_boxed_int (obj);
14 free (obj); /* { dg-warning "double-free" } */
15 }
16
17 int main() { return 0; }