From: Jason Merrill Date: Sat, 14 Nov 2015 18:54:16 +0000 (-0500) Subject: re PR bootstrap/68346 (Bootstrap failure on i686-linux) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=38e5f0454c22a422f0aa2e5f2ec2962baa6427ab;p=gcc.git re PR bootstrap/68346 (Bootstrap failure on i686-linux) PR bootstrap/68346 * call.c (build_new_op_1): Don't fold arguments to warn_tautological_cmp. From-SVN: r230382 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index baaabc8761f..b154453dde1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2015-11-14 Jason Merrill + + PR bootstrap/68346 + * call.c (build_new_op_1): Don't fold arguments to + warn_tautological_cmp. + 2015-11-14 Jakub Jelinek * semantics.c (finish_omp_clauses): Don't mark diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 77c29366b13..8cdda6200e1 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -5741,7 +5741,7 @@ build_new_op_1 (location_t loc, enum tree_code code, int flags, tree arg1, 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: diff --git a/gcc/testsuite/g++.dg/warn/Wtautological-compare.C b/gcc/testsuite/g++.dg/warn/Wtautological-compare.C new file mode 100644 index 00000000000..451fd54850d --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wtautological-compare.C @@ -0,0 +1,7 @@ +// PR bootstrap/68346 +// { dg-options -Wtautological-compare } + +bool f(unsigned u) +{ + return ((unsigned)(int)u == u); +}