1 #include <stdlib.h>
2
3 int foo ();
4 int bar ();
5
6 /* Verify that only significant edges are reported. */
7
8 void test (int a, int b, int c)
9 {
10 void *p = malloc (1024); /* { dg-message "allocated here" } */
11 while (a) /* { dg-bogus "" } */
12 foo ();
13 if (b) /* { dg-bogus "" } */
14 foo ();
15 else
16 bar ();
17 if (c) /* { dg-message "following 'true' branch" } */
18 free (p); /* { dg-message "first 'free' here" } */
19 free (p); /* { dg-warning "double-'free' of 'p'" } */
20 }