aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/malloc-paths-6.c
blob: 1df6964544e275be5c995244bafd34d72465b883 (plain)
1
2
3
4
5
6
7
8
9
10
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.  */
}