http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44777

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|gcc-bugs at gcc dot gnu.org |hubicka at gcc dot gnu.org,
                   |                            |jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-04 
14:27:21 UTC ---
In y we instrument edges 2->5 (count 1001), 3->4 (count 0), 5->6 (count 1) and
7->8 (count 0).  bb 4 has the goto *x; which is never executed (a is never -1),
bb 6 ends in the non-local goto, bb 7 contains the recursive call to y and bb 8
contains the return from y (which is even never reached, as the innermost y
call performs a non-local goto to the caller).
I think the problem is that the fake edge from bb 7 to exit (the one added
because the call is not const/pure/noreturn and thus might not return at all or
might return e.g. through throwing exception or (in this case doing nonlocal
goto) is not added to the spanning tree, because there is already fake edge
from entry to the same block 7 (as bb 7 is also a destination of the abnormal
edge, computed goto).
Don't we need for bbs that have both entry and exit fake edges split those bbs
before find_spanning_tree (or in it), so that instrumentation can be added into
the middle of that basic block?

Reply via email to