Commit 7cf5c9e1 by Bernd Schmidt Committed by Bernd Schmidt

Fix crash in fold_range_test

From-SVN: r37712
parent ff6534ad
2000-11-24 Bernd Schmidt <bernds@redhat.co.uk>
* fold-const.c (fold_range_test): Avoid crash if LHS or RHS is null.
* reload1.c (conflicts_with_override): New function.
(emit_input_reload_insns): Use it to tighten test for validity
of substituting into output of previous insn.
......
......@@ -3780,6 +3780,7 @@ fold_range_test (exp)
short-circuited branch and the underlying object on both sides
is the same, make a non-short-circuit operation. */
else if (BRANCH_COST >= 2
&& lhs != 0 && rhs != 0
&& (TREE_CODE (exp) == TRUTH_ANDIF_EXPR
|| TREE_CODE (exp) == TRUTH_ORIF_EXPR)
&& operand_equal_p (lhs, rhs, 0))
......
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