Bug path

test_1
‘test_1’: events 1-2
10void test_1 ()
^~~~~~
|
(1) entry to ‘test_1’
11{
12 calls_malloc (); /* { dg-message "calling 'calls_malloc' from 'test_1'" } */
~~~~~~~~~~~~~~~
|
(2) calling ‘calls_malloc’ from ‘test_1’
calls_malloc
‘calls_malloc’: events 3-5
4calls_malloc (void)
^~~~~~~~~~~~
|
(3) entry to ‘calls_malloc’
5{
6 void *result = malloc (1024); /* { dg-message "allocated here" } */
~~~~~~~~~~~~~
|
(4) allocated here
7 return result; /* { dg-warning "leak of 'result'" } */
~~~~~~
|
(5) ‘result’ leaks here; was allocated at (4)