Commit e30afafb by Jakub Jelinek Committed by Jakub Jelinek

re PR bootstrap/51725 (segfault in stage 3 when compiling gcc/opts.c for sparc64-linux)

	PR bootstrap/51725
	* cselib.c (new_elt_loc_list): When moving locs from one
	cselib_val to its new canonical_cselib_val and the
	cselib_val was in first_containing_mem chain, but
	the canonical_cselib_val was not, add the latter into the
	chain.
	(cselib_invalidate_mem): Compare canonical_cselib_val of
	addr_list chain elt with v.

From-SVN: r182858
parent 346afd84
2012-01-03 Jakub Jelinek <jakub@redhat.com> 2012-01-03 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/51725
* cselib.c (new_elt_loc_list): When moving locs from one
cselib_val to its new canonical_cselib_val and the
cselib_val was in first_containing_mem chain, but
the canonical_cselib_val was not, add the latter into the
chain.
(cselib_invalidate_mem): Compare canonical_cselib_val of
addr_list chain elt with v.
PR pch/51722 PR pch/51722
* dwarf2out.c (dwarf2out_start_source_file, dwarf2out_define, * dwarf2out.c (dwarf2out_start_source_file, dwarf2out_define,
dwarf2out_undef): Allocate e.info using ggc_strdup instead dwarf2out_undef): Allocate e.info using ggc_strdup instead
...@@ -277,6 +277,12 @@ new_elt_loc_list (cselib_val *val, rtx loc) ...@@ -277,6 +277,12 @@ new_elt_loc_list (cselib_val *val, rtx loc)
} }
el->next = val->locs; el->next = val->locs;
next = val->locs = CSELIB_VAL_PTR (loc)->locs; next = val->locs = CSELIB_VAL_PTR (loc)->locs;
if (CSELIB_VAL_PTR (loc)->next_containing_mem != NULL
&& val->next_containing_mem == NULL)
{
val->next_containing_mem = first_containing_mem;
first_containing_mem = val;
}
} }
/* Chain LOC back to VAL. */ /* Chain LOC back to VAL. */
...@@ -2211,7 +2217,7 @@ cselib_invalidate_mem (rtx mem_rtx) ...@@ -2211,7 +2217,7 @@ cselib_invalidate_mem (rtx mem_rtx)
mem_chain = &addr->addr_list; mem_chain = &addr->addr_list;
for (;;) for (;;)
{ {
if ((*mem_chain)->elt == v) if (canonical_cselib_val ((*mem_chain)->elt) == v)
{ {
unchain_one_elt_list (mem_chain); unchain_one_elt_list (mem_chain);
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment