https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68117
--- Comment #30 from Richard Biener <rguenth at gcc dot gnu.org> --- Ok, so we already do void remove_edge (edge e) { if (current_loops != NULL) rescan_loop_exit (e, false, true); /* This is probably not needed, but it doesn't hurt. */ /* FIXME: This should be called via a remove_edge hook. */ if (current_ir_type () == IR_GIMPLE) redirect_edge_var_map_clear (e); but we fail to clear the edge map data during RTL expansion. So the simpler patch Index: gcc/cfgexpand.c =================================================================== --- gcc/cfgexpand.c (revision 230404) +++ gcc/cfgexpand.c (working copy) @@ -6275,6 +6278,9 @@ pass_expand::execute (function *fun) expand_phi_nodes (&SA); + /* Release any stale SSA redirection data. */ + redirect_edge_var_map_destroy (); + /* Register rtl specific functions for cfg. */ rtl_register_cfg_hooks (); might be enough.