PR bootstrap/68346
* call.c (build_new_op_1): Don't fold arguments to
warn_tautological_cmp.
From-SVN: r230382
+2015-11-14 Jason Merrill <jason@redhat.com>
+
+ PR bootstrap/68346
+ * call.c (build_new_op_1): Don't fold arguments to
+ warn_tautological_cmp.
+
2015-11-14 Jakub Jelinek <jakub@redhat.com>
* semantics.c (finish_omp_clauses): Don't mark
maybe_warn_bool_compare (loc, code, fold (arg1),
fold (arg2));
if (complain & tf_warning && warn_tautological_compare)
- warn_tautological_cmp (loc, code, fold (arg1), fold (arg2));
+ warn_tautological_cmp (loc, code, arg1, arg2);
/* Fall through. */
case PLUS_EXPR:
case MINUS_EXPR:
--- /dev/null
+// PR bootstrap/68346
+// { dg-options -Wtautological-compare }
+
+bool f(unsigned u)
+{
+ return ((unsigned)(int)u == u);
+}