diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/analyzer/malloc-paths-6.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/analyzer/malloc-paths-6.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-6.c b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-6.c new file mode 100644 index 0000000..1df6964 --- /dev/null +++ b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-6.c @@ -0,0 +1,11 @@ +#include <stdlib.h> + +void test (void *ptr) +{ + void *q; + q = ptr; + free (ptr); + free (q); /* { dg-warning "double-'free' of 'q'" } */ + /* The above case requires us to handle equivalence classes in + state transitions. */ +} |