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: unassig...@gcc.gnu.org ReportedBy: lepp...@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.