The change to get the entry for the old edge before inserting the new
one was incorrect because if inserting the new one resized the table
then the pointer to the entry for the old one would become invalid.
gcc/
* tree-ssa.c (redirect_edge_var_map_dup): insert newe before
getting olde.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213644
138bc75d-0d04-0410-961f-
82ee72b054a4
+2014-08-05 Trevor Saunders <tsaunders@mozilla.com>
+
+ * tree-ssa.c (redirect_edge_var_map_dup): insert newe before
+ getting olde.
+
2014-08-05 Richard Biener <rguenther@suse.de>
PR rtl-optimization/61672
if (!edge_var_maps)
return;
- auto_vec<edge_var_map> *head = edge_var_maps->get (olde);
- if (!head)
+ auto_vec<edge_var_map> *new_head = &edge_var_maps->get_or_insert (newe);
+ auto_vec<edge_var_map> *old_head = edge_var_maps->get (olde);
+ if (!old_head)
return;
- edge_var_maps->get_or_insert (newe).safe_splice (*head);
+ new_head->safe_splice (*old_head);
}