------- Comment #7 from amylaar at gcc dot gnu dot org 2006-08-24 16:22 ------- (In reply to comment #0)
Actually, I think this code: /* If this is an abnormal edge, we'll insert at the end of the previous block. */ if (eg->flags & EDGE_ABNORMAL) ... is just nonsense. It's not safe to insert at the end of the previous block, since it may be more than one successor. In fact, this is expected both for exception handling (where there is a fall-through path) as well as computed jumps (if there is only one successor, why compute it?) And when the other code to handle abnormal edges is fixed, we should not even try to insert a mode set on an abnormal edge, so the above code can be changed into gcc_assert (! (eg_flags & EDGE_ABNORMAL)) On possible optimization is to identify when there is no fall-through predecessor for the edge destination, and a means exists to redirect the abnormal edge (that should be possible in a simple exception handling scenario); in that case, the abnormal edge can be redirected to a newly created fall-through predecssor of the original successor block. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28764