aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family/c-common.c
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2012-05-08 22:14:34 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2012-05-08 22:14:34 +0000
commit1e537948675aa0543bad80ab38f931f16b145d1a (patch)
tree957014ac6e2146d8b801bd8f62d983884916e0d0 /gcc/c-family/c-common.c
parentb3c9bb62b7f586c0069f3a5410e7982612652ece (diff)
downloadgcc-1e537948675aa0543bad80ab38f931f16b145d1a.zip
gcc-1e537948675aa0543bad80ab38f931f16b145d1a.tar.gz
gcc-1e537948675aa0543bad80ab38f931f16b145d1a.tar.bz2
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
Diffstat (limited to 'gcc/c-family/c-common.c')
-rw-r--r--gcc/c-family/c-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 04a265f..1cdef9a 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