re PR c++/53261 (ICE in tree_strip_nop_conversions)
authorManuel López-Ibáñez <manu@gcc.gnu.org>
Tue, 8 May 2012 22:14:34 +0000 (22:14 +0000)
committerManuel López-Ibáñez <manu@gcc.gnu.org>
Tue, 8 May 2012 22:14:34 +0000 (22:14 +0000)
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

gcc/c-family/ChangeLog
gcc/c-family/c-common.c

index accb9850074cebf3d427fa85409227585d18399e..52a7f5c9a4077a9b8536bbae622c01bd5253bc78 100644 (file)
@@ -1,3 +1,9 @@
+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>
 
        PR c/43772
index 04a265f97db00aa901cdf04a62a95ef618926130..1cdef9a995c3c3a200ece7aec4d93ea8e5fbdb7a 100644 (file)
@@ -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