| 1 |
/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */ |
| 2 |
|
| 3 |
#include <stdlib.h> |
| 4 |
|
| 5 |
void recursive_free (void *ptr) |
| 6 |
{ |
| 7 |
free (ptr); /* { dg-warning "double-'free' of 'ptr'" } */ |
| 8 |
recursive_free (ptr); /* { dg-warning "infinite recursion" } */ |
| 9 |
} |