[Bug tree-optimization/50932] New: inserting a gimple_call with gsi_insert_after creates error in remove_unreachable_handler

leppkes at stce dot rwth-aachen.de gcc-bugzilla@gcc.gnu.org
Mon Oct 31 13:43:00 GMT 2011


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

             Bug #: 50932
           Summary: inserting a gimple_call with gsi_insert_after creates
                    error in remove_unreachable_handler
    Classification: Unclassified
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: leppkes@stce.rwth-aachen.de


Created attachment 25673
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25673
plugin.c with Make and testfiles.

I want to create calls to my instrument functions. Therefor i'm writing a gcc
plugin.

Before and after function is called, i want to call my instrument function.

Inserting a gimple_call before the statement is no problem, but inserting after
creates the following bug:

"[...] internal compiler error: in remove_unreachable_handlers, at
tree-eh.c:3299"


See the attached tarbal:

- The insert_debug2 function inserts a gimple_call after the actual call in the
subroutine. The dump-files shows that the call is inserted corretly, but then
the compiler crashes.



More information about the Gcc-bugs mailing list