From: Manuel López-Ibáñez Date: Tue, 8 May 2012 22:14:34 +0000 (+0000) Subject: re PR c++/53261 (ICE in tree_strip_nop_conversions) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e537948675aa0543bad80ab38f931f16b145d1a;p=gcc.git re PR c++/53261 (ICE in tree_strip_nop_conversions) 2012-05-09 Manuel López-Ibáñez PR c++/53261 c-family/ * c-common.c (warn_logical_operator): Check that argument of integer_zerop is not NULL. From-SVN: r187300 --- diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index accb9850074..52a7f5c9a40 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2012-05-09 Manuel López-Ibáñez + + 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 PR c/43772 diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 04a265f97db..1cdef9a995c 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -1629,7 +1629,7 @@ warn_logical_operator (location_t location, enum tree_code code, tree type, in0_p = !in0_p; tem = build_range_check (UNKNOWN_LOCATION, type, lhs, in0_p, low0, high0); - if (integer_zerop (tem)) + if (tem && integer_zerop (tem)) return; 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, in1_p = !in1_p; tem = build_range_check (UNKNOWN_LOCATION, type, rhs, in1_p, low1, high1); - if (integer_zerop (tem)) + if (tem && integer_zerop (tem)) return; /* If both expressions have the same operand, if we can merge the