| 
  
 test_2 
  | 
     ‘test_2’: events 1-4 
|    94 | void test_2 (void *ptr, int a, int b) |  
 |      ^~~~~~ |  
 |      | |  
 |      (1) entry to ‘test_2’ |  
|    95 | { |  
|    96 |   switch (a) |  
 |   ~~~~~~ |  
 |   | |  
 |   (2) following ‘case 3:’ branch... |  
| [...] |  |  
|   102 |     case 3: |  
 |     ~~~~ |  
 |     | |  
 |     (3) ...to here |  
|   103 |       calls_free_2 (ptr); |  
 |       ~~~~~~~~~~~~~~~~~~ |  
 |       | |  
 |       (4) calling ‘calls_free_2’ from ‘test_2’ |  
 
 |   
   | 
  
 calls_free_2 
  | 
     ‘calls_free_2’: events 5-6 
|    89 | void calls_free_2 (void *ptr) |  
 |      ^~~~~~~~~~~~ |  
 |      | |  
 |      (5) entry to ‘calls_free_2’ |  
|    90 | { |  
|    91 |   free (ptr); /* { dg-warning "double-'free' of 'ptr'" } */ |  
 |   ~~~~~~~~~~ |  
 |   | |  
 |   (6) first ‘free’ here |  
 
 |   
 |   
  | 
     ‘test_2’: events 7-10 
|   103 |       calls_free_2 (ptr); |  
 |       ^~~~~~~~~~~~~~~~~~ |  
 |       | |  
 |       (7) returning to ‘test_2’ from ‘calls_free_2’ |  
| [...] |  |  
|   107 |   switch (b) |  
 |   ~~~~~~ |  
 |   | |  
 |   (8) following ‘default:’ branch... |  
|   108 |     { |  
|   109 |     default: |  
 |     ~~~~~~~ |  
 |     | |  
 |     (9) ...to here |  
|   110 |       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 
|    89 | void calls_free_2 (void *ptr) |  
 |      ^~~~~~~~~~~~ |  
 |      | |  
 |      (11) entry to ‘calls_free_2’ |  
|    90 | { |  
|    91 |   free (ptr); /* { dg-warning "double-'free' of 'ptr'" } */ |  
 |   ~~~~~~~~~~ |  
 |   | |  
 |   (12) second ‘free’ here; first ‘free’ was at (6) |  
 
 |   
 |   
 |