blob: 1b4b8788b86b831148de0c2396822c4f8392e996 [file] [log] [blame]
/* { dg-additional-options "-O2" } */
#include <stdlib.h>
void test(void)
{
void *ptr = malloc(512);
free(ptr);
free(ptr); /* { dg-warning "double-'free'" "" { xfail *-*-* } } */
}
/* With optimization, the whole of test() goes away in the "cddce" pass
before the analysis pass sees it, and hence we get no error message. */