Commit 0e34f6d8 by Jeff Law Committed by Jeff Law

re PR tree-optimization/82052 (ICE with "-O3 -m32" on x86_64-linux-gnu (internal…

re PR tree-optimization/82052 (ICE with "-O3 -m32" on x86_64-linux-gnu (internal compiler error: in pop_to_marker, at tree-ssa-scopedtables.c:71))

	PR tree-optimization/82052
	* tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
	Always initialize the returned slot after a hash table miss
	when INSERT is true.

	PR tree-optimization/82052
	* gcc.c-torture/compile/pr82052.c: New test.

From-SVN: r251600
parent 44acb9ba
2017-09-01 Jeff Law <law@redhat.com>
PR tree-optimization/82052
* tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
Always initialize the returned slot after a hash table miss
when INSERT is true.
2017-09-01 Alexander Monakov <amonakov@ispras.ru> 2017-09-01 Alexander Monakov <amonakov@ispras.ru>
* config/s390/s390.md (mem_signal_fence): Remove. * config/s390/s390.md (mem_signal_fence): Remove.
......
2017-09-01 Jeff Law <law@redhat.com>
PR tree-optimization/82052
* gcc.c-torture/compile/pr82052.c: New test.
2017-09-01 Jakub Jelinek <jakub@redhat.com> 2017-09-01 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/81923 PR sanitizer/81923
......
...@@ -258,15 +258,24 @@ avail_exprs_stack::lookup_avail_expr (gimple *stmt, bool insert, bool tbaa_p) ...@@ -258,15 +258,24 @@ avail_exprs_stack::lookup_avail_expr (gimple *stmt, bool insert, bool tbaa_p)
{ {
/* If we did not find the expression in the hash table, we may still /* If we did not find the expression in the hash table, we may still
be able to produce a result for some expressions. */ be able to produce a result for some expressions. */
tree alt = avail_exprs_stack::simplify_binary_operation (stmt, element); tree retval = avail_exprs_stack::simplify_binary_operation (stmt,
if (alt) element);
return alt;
/* We have, in effect, allocated *SLOT for ELEMENT at this point.
We must initialize *SLOT to a real entry, even if we found a
way to prove ELEMENT was a constant after not finding ELEMENT
in the hash table.
An uninitialized or empty slot is an indication no prior objects
entered into the hash table had a hash collection with ELEMENT.
If we fail to do so and had such entries in the table, they
would become unreachable. */
class expr_hash_elt *element2 = new expr_hash_elt (element); class expr_hash_elt *element2 = new expr_hash_elt (element);
*slot = element2; *slot = element2;
record_expr (element2, NULL, '2'); record_expr (element2, NULL, '2');
return NULL_TREE; return retval;
} }
/* If we found a redundant memory operation do an alias walk to /* If we found a redundant memory operation do an alias walk to
......
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