From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2122) id 9F2E93858432; Tue, 25 Oct 2022 18:05:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F2E93858432 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666721140; bh=jUUo1nKqrAitpfo17E4aqUAcik3H1rf1EntkfTkk5K8=; h=From:To:Subject:Date:From; b=jVnHQHPBMB6qu6DSqj7/9MxAcDdC0JWS27zVpL+md5migurjvkim9iEYId5ih1JMk CkZhbJYgBkvf3Bp1tWP4JdX2KEassOo+1SW1VPiVnin1g6xJQJra9ICDfeP479Ji/H AGVnJj4oc/f0FnPuZMK6Nf2C797VvEdIYrcGDMQc= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jason Merrill To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3492] c++: correct fold_operand change X-Act-Checkin: gcc X-Git-Author: Jason Merrill X-Git-Refname: refs/heads/master X-Git-Oldrev: 15d67c11ac0479b08e3badcafdee7e0a6f062349 X-Git-Newrev: 4a54873d7753068fe64e01efd5d8a06615bdb167 Message-Id: <20221025180540.9F2E93858432@sourceware.org> Date: Tue, 25 Oct 2022 18:05:40 +0000 (GMT) List-Id: https://gcc.gnu.org/g:4a54873d7753068fe64e01efd5d8a06615bdb167 commit r13-3492-g4a54873d7753068fe64e01efd5d8a06615bdb167 Author: Jason Merrill Date: Tue Oct 25 13:54:12 2022 -0400 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: --- gcc/cp/constexpr.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/cp/constexpr.cc b/gcc/cp/constexpr.cc index 39bb023b79c..15b4f2c4a08 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;