Bug path

outer
‘outer’: event 1
18void outer (void)
^~~~~
|
(1) entry to ‘outer’
‘outer’: event 2
24 i = SETJMP(env);
^~~~~~
|
(2) ‘setjmp’ called here
‘outer’: events 3-5
26 if (i == 0)
^
|
(3) following ‘true’ branch (when ‘i == 0’)...
27 {
28 foo (1);
~~~~~~~
|
(4) ...to here
29 inner ();
~~~~~~~~
|
(5) calling ‘inner’ from ‘outer’
inner
‘inner’: events 6-9
11static void inner (void)
^~~~~
|
(6) entry to ‘inner’
12{
13 void *ptr = malloc (1024); /* { dg-message "allocated here" } */
~~~~~~~~~~~~~
|
(7) allocated here
14 longjmp (env, 1); /* { dg-warning "leak of 'ptr'" } */
~~~~~~~~~~~~~~~~
|
(8) ‘ptr’ leaks here; was allocated at (7)
(9) rewinding from ‘longjmp’ in ‘inner’...
‘outer’: event 10
24 i = SETJMP(env);
^~~~~~
|
(10) ...to ‘setjmp’ in ‘outer’ (saved at (2))