re PR c++/53261 (ICE in tree_strip_nop_conversions)

2012-05-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	PR c++/53261
c-family/
	* c-common.c (warn_logical_operator): Check that argument of
	integer_zerop is not NULL.

From-SVN: r187300
parent b3c9bb62
2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/53261
* c-common.c (warn_logical_operator): Check that argument of
integer_zerop is not NULL.
2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org> 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/43772 PR c/43772
......
...@@ -1629,7 +1629,7 @@ warn_logical_operator (location_t location, enum tree_code code, tree type, ...@@ -1629,7 +1629,7 @@ warn_logical_operator (location_t location, enum tree_code code, tree type,
in0_p = !in0_p; in0_p = !in0_p;
tem = build_range_check (UNKNOWN_LOCATION, type, lhs, in0_p, low0, high0); tem = build_range_check (UNKNOWN_LOCATION, type, lhs, in0_p, low0, high0);
if (integer_zerop (tem)) if (tem && integer_zerop (tem))
return; return;
rhs = make_range (op_right, &in1_p, &low1, &high1, &strict_overflow_p); rhs = make_range (op_right, &in1_p, &low1, &high1, &strict_overflow_p);
...@@ -1644,7 +1644,7 @@ warn_logical_operator (location_t location, enum tree_code code, tree type, ...@@ -1644,7 +1644,7 @@ warn_logical_operator (location_t location, enum tree_code code, tree type,
in1_p = !in1_p; in1_p = !in1_p;
tem = build_range_check (UNKNOWN_LOCATION, type, rhs, in1_p, low1, high1); tem = build_range_check (UNKNOWN_LOCATION, type, rhs, in1_p, low1, high1);
if (integer_zerop (tem)) if (tem && integer_zerop (tem))
return; return;
/* If both expressions have the same operand, if we can merge the /* If both expressions have the same operand, if we can merge the
......
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