From: Jason Merrill Date: Tue, 25 Oct 2022 17:54:12 +0000 (-0400) Subject: c++: correct fold_operand change X-Git-Tag: basepoints/gcc-14~3715 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a54873d7753068fe64e01efd5d8a06615bdb167;p=thirdparty%2Fgcc.git c++: correct fold_operand change Still want the conversion to bool. gcc/cp/ChangeLog: * constexpr.cc (find_failing_clause_r): Re-add the call to contextual_conv_bool. --- diff --git a/gcc/cp/constexpr.cc b/gcc/cp/constexpr.cc index 39bb023b79c2..15b4f2c4a080 100644 --- a/gcc/cp/constexpr.cc +++ b/gcc/cp/constexpr.cc @@ -1887,7 +1887,8 @@ find_failing_clause_r (const constexpr_ctx *ctx, tree expr) e = find_failing_clause_r (ctx, TREE_OPERAND (expr, 1)); return e; } - tree e = fold_operand (expr, ctx); + tree e = contextual_conv_bool (expr, tf_none); + e = fold_operand (e, ctx); if (integer_zerop (e)) /* This is the failing clause. */ return expr;