On Thu, Aug 16, 2012 at 9:34 AM, Matt Davis <mattdav...@gmail.com> wrote: > Hello, > This is a similar problem I was having yesterday, and I need to > understand how to fix this. This is somewhat similar to my previous > inquiry, I do apologize. In my compiler pass I am inserting a new > GIMPLE assignment statement after an existing function call statement. > This usually works fine, but in one of my cases, the original > function call statement is at the end of a basic block. Unfortunately > the EH data must not be updated properly in the original function call > statement since I keep ICEing the compiler in > remove_unreachable_handlers(), at tree-eh.c:3524 on gcc 4.7.1. The > gsi_one_before_end_p on that call statement is returning 'false' > (which seems correct since it is no longer the last statement in that > block) and the compiler assert is triggered. Any insight would be > appreciated, thanks.
You can't insert a call right after a possibly throwing call. You have to insert your call on the non-EH edge instead. Richard. > -Matt