1 /* { dg-skip-if "requires hosted libstdc++ for cstdlib free" { ! hostedlib } } */
5 void test_1 (void *ptr)
7 std::free (ptr); /* { dg-message "first 'free' here" } */
8 std::free (ptr); /* { dg-warning "double-'free' of 'ptr'" } */
13 void *p = std::malloc (1024); /* { dg-message "allocated here" } */
14 } /* { dg-warning "leak of 'p'" } */
18 void *p = std::calloc (42, 1024); /* { dg-message "allocated here" } */
19 } /* { dg-warning "leak of 'p'" } */