+ if (TREE_CODE (outer_type) == REAL_TYPE)
+ {
+ if (TREE_CODE (inner_type) == REAL_TYPE)
+ return tree_expr_nonnegative_warnv_p (op0,
+ strict_overflow_p);
+ if (TREE_CODE (inner_type) == INTEGER_TYPE)
+ {
+ if (TYPE_UNSIGNED (inner_type))
+ return true;
+ return tree_expr_nonnegative_warnv_p (op0,
+ strict_overflow_p);
+ }
+ }
+ else if (TREE_CODE (outer_type) == INTEGER_TYPE)
+ {
+ if (TREE_CODE (inner_type) == REAL_TYPE)
+ return tree_expr_nonnegative_warnv_p (op0,
+ strict_overflow_p);
+ if (TREE_CODE (inner_type) == INTEGER_TYPE)
+ return TYPE_PRECISION (inner_type) < TYPE_PRECISION (outer_type)
+ && TYPE_UNSIGNED (inner_type);
+ }
+ }
+ break;
+
+ default:
+ return tree_simple_nonnegative_warnv_p (code, type);
+ }
+
+ /* We don't know sign of `t', so be conservative and return false. */
+ return false;
+}
+
+/* Return true if (CODE OP0 OP1) is known to be non-negative. If the return
+ value is based on the assumption that signed overflow is undefined,
+ set *STRICT_OVERFLOW_P to true; otherwise, don't change
+ *STRICT_OVERFLOW_P. */
+
+static bool
+tree_binary_nonnegative_warnv_p (enum tree_code code, tree type, tree op0,
+ tree op1, bool *strict_overflow_p)
+{
+ if (TYPE_UNSIGNED (type))
+ return true;