| 
  
 test_2 
  | 
     ‘test_2’: events 1-4 
|    68 | void test_2 (void *ptr, int a, int b) |  
 |      ^~~~~~ |  
 |      | |  
 |      (1) entry to ‘test_2’ |  
|    69 | { |  
|    70 |   switch (a) |  
 |   ~~~~~~ |  
 |   | |  
 |   (2) following ‘case 3:’ branch... |  
| [...] |  |  
|    76 |     case 3: |  
 |     ~~~~ |  
 |     | |  
 |     (3) ...to here |  
|    77 |       calls_free_2 (ptr); |  
 |       ~~~~~~~~~~~~~~~~~~ |  
 |       | |  
 |       (4) calling ‘calls_free_2’ from ‘test_2’ |  
 
 |   
   | 
  
 calls_free_2 
  | 
     ‘calls_free_2’: events 5-6 
|    63 | void calls_free_2 (void *ptr) |  
 |      ^~~~~~~~~~~~ |  
 |      | |  
 |      (5) entry to ‘calls_free_2’ |  
|    64 | { |  
|    65 |   free (ptr); /* { dg-warning "double-'free' of 'ptr'" } */ |  
 |   ~~~~~~~~~~ |  
 |   | |  
 |   (6) first ‘free’ here |  
 
 |   
 |   
  | 
     ‘test_2’: events 7-10 
|    77 |       calls_free_2 (ptr); |  
 |       ^~~~~~~~~~~~~~~~~~ |  
 |       | |  
 |       (7) returning to ‘test_2’ from ‘calls_free_2’ |  
| [...] |  |  
|    81 |   switch (b) |  
 |   ~~~~~~ |  
 |   | |  
 |   (8) following ‘default:’ branch... |  
|    82 |     { |  
|    83 |     default: |  
 |     ~~~~~~~ |  
 |     | |  
 |     (9) ...to here |  
|    84 |       calls_free_2 (ptr); |  
 |       ~~~~~~~~~~~~~~~~~~ |  
 |       | |  
 |       (10) passing freed pointer ‘ptr’ in call to ‘calls_free_2’ from ‘test_2’ |  
 
 |   
   | 
  
 calls_free_2 
  | 
     ‘calls_free_2’: events 11-12 
|    63 | void calls_free_2 (void *ptr) |  
 |      ^~~~~~~~~~~~ |  
 |      | |  
 |      (11) entry to ‘calls_free_2’ |  
|    64 | { |  
|    65 |   free (ptr); /* { dg-warning "double-'free' of 'ptr'" } */ |  
 |   ~~~~~~~~~~ |  
 |   | |  
 |   (12) second ‘free’ here; first ‘free’ was at (6) |  
 
 |   
 |   
 |