From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 436FB3858402 for ; Tue, 25 Oct 2022 18:05:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 436FB3858402 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666721120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lORKuAJlcgRnBwHVZDoIAkzGMDfRNEeUbHVlVZ8Mt1w=; b=eFHoVVLLe6zcKYVbrCUlL2aMYxZgelVblDzwZsm579h19qyG4pR6g+nPZYJXHXyNUHArb2 Dpc4l+5DgeFZzE8vxHz2YdVIU8G5/chTG84YVKEsSqujDLfNQe+aqNz9M/MmwvHTL74WZ3 HyAscvFExNOpOboJzltvHb/rhEkIiTo= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-290-o5eIArCxPQKA-VjmdijLLA-1; Tue, 25 Oct 2022 14:05:10 -0400 X-MC-Unique: o5eIArCxPQKA-VjmdijLLA-1 Received: by mail-qk1-f197.google.com with SMTP id f12-20020a05620a408c00b006ced53b80e5so12143923qko.17 for ; Tue, 25 Oct 2022 11:05:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lORKuAJlcgRnBwHVZDoIAkzGMDfRNEeUbHVlVZ8Mt1w=; b=IsxGh/9ZuM6RgOOxeKO9MsYPtUYsjsvOoLjWo0vSQLzPbxKyqyznjMnJhZEFGm6kKa OQQa9UQ30IkHUx9H/lKbxg0iaHrzDuvhTN4LnLpFGxFL+Vwrn4zLZdUfRvOszwwgR4Jx loEJ1YK+6p9CCRdowAMQ4BBOBWnfNJ3gZvCCxk1H82ZYjqZe6dGNeqFjfa+w97GWZrXA vn8LwyZorzQZKWN3XDRUX5wIACarZsRLbjSLNr+wRdP6mbszj9fJEhGAV8JGGevK/161 ylS68RF4XILRO4KtCmaiP0yxngU4gdZN/XpiEo33eTSlUdG7L56LO3gef+BWo5lgjhij daUg== X-Gm-Message-State: ACrzQf0PQid7PZui5SHJI+zCyYt7EDJxn8mF8cPFI9xRnD5BFu4P2OJz NZjMveWodmuQE1YbH5tLphrONbRgXWUqkvWFm5MIlj5EgWXRNnHz/dhDQFfij+Jk8lAVTWy1iUN bgrAbk/SPGYtn+jC/WIBupjjOMdO7B5ejywKQ6KuRIoWJFReYZ4bbT9NkL+etCCYzEg== X-Received: by 2002:a05:622a:1ba7:b0:39c:e770:2809 with SMTP id bp39-20020a05622a1ba700b0039ce7702809mr33422473qtb.423.1666721109779; Tue, 25 Oct 2022 11:05:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4+rghLNUhr+OyWm1gtQln59JAPyAEDzCM2o0FTyk7KLWZTnhNU7VEE9k7IIJOtVgWa+mvskQ== X-Received: by 2002:a05:622a:1ba7:b0:39c:e770:2809 with SMTP id bp39-20020a05622a1ba700b0039ce7702809mr33422434qtb.423.1666721109331; Tue, 25 Oct 2022 11:05:09 -0700 (PDT) Received: from barrymore.redhat.com (130-44-159-43.s15913.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.159.43]) by smtp.gmail.com with ESMTPSA id a25-20020a05620a16d900b006b615cd8c13sm2270989qkn.106.2022.10.25.11.05.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Oct 2022 11:05:08 -0700 (PDT) From: Jason Merrill To: gcc-patches@gcc.gnu.org Subject: [pushed] c++: correct fold_operand change Date: Tue, 25 Oct 2022 14:05:06 -0400 Message-Id: <20221025180506.108938-1-jason@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221025163709.95817-1-jason@redhat.com> References: <20221025163709.95817-1-jason@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Tested x86_64-pc-linux-gnu, applying to trunk. -- >8 -- Still want the conversion to bool. gcc/cp/ChangeLog: * constexpr.cc (find_failing_clause_r): Re-add the call to contextual_conv_bool. --- 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; base-commit: e6a29aab51122103e677ffed523371c9c816ec98 -- 2.31.1