From patchwork Tue Jan 18 10:12:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 50148 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6E14E3857C40 for ; Tue, 18 Jan 2022 10:13:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E14E3857C40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1642500814; bh=/nyGyos5qi+kAXsnV04VSwINuLUPqTRM94PF9sohTH0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=W9AKbtm9QAAU7cMMLLneo0FPXDuHBFoCYr9xpO+dmfWTTO5auUxuFGr6rv7IAHNCd B7zUpVhe35tgtmgrIsxdqjlCfz34IBhmrYSnfKQ47SreKWoABgcDPo1qU7uTaDM1l0 YO87NkDbdaY05Ae8AqgNzWHYGzUfsZonx5iMc+ZY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 6C5E13857C6D for ; Tue, 18 Jan 2022 10:12:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6C5E13857C6D Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-671-y2SrHwXLNa2fVmx8MWhj-Q-1; Tue, 18 Jan 2022 05:12:23 -0500 X-MC-Unique: y2SrHwXLNa2fVmx8MWhj-Q-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B6F7C1015DA0; Tue, 18 Jan 2022 10:12:22 +0000 (UTC) Received: from localhost (unknown [10.33.37.93]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6AEEB1059580; Tue, 18 Jan 2022 10:12:21 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed 1/2] libstdc++: Fix deduction failure for std::min call [PR104080] Date: Tue, 18 Jan 2022 10:12:19 +0000 Message-Id: <20220118101220.3578219-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.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_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Cc: hp@gcc.gnu.org Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Tested x86_64-linux, pushed to trunk. Reported upstream as https://github.com/fastfloat/fast_float/pull/122 libstdc++-v3/ChangeLog: PR libstdc++/104080 * src/c++17/fast_float/LOCAL_PATCHES: UPDATE. * src/c++17/fast_float/fast_float.h (round): Use explicit template argument list for std::min. --- libstdc++-v3/src/c++17/fast_float/LOCAL_PATCHES | 1 + libstdc++-v3/src/c++17/fast_float/fast_float.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/src/c++17/fast_float/LOCAL_PATCHES b/libstdc++-v3/src/c++17/fast_float/LOCAL_PATCHES index 71495d6728b..447c7ed2cdb 100644 --- a/libstdc++-v3/src/c++17/fast_float/LOCAL_PATCHES +++ b/libstdc++-v3/src/c++17/fast_float/LOCAL_PATCHES @@ -1,2 +1,3 @@ r12-6647 r12-6648 +r12-6664 diff --git a/libstdc++-v3/src/c++17/fast_float/fast_float.h b/libstdc++-v3/src/c++17/fast_float/fast_float.h index 97d28940944..ee129309ba3 100644 --- a/libstdc++-v3/src/c++17/fast_float/fast_float.h +++ b/libstdc++-v3/src/c++17/fast_float/fast_float.h @@ -2466,7 +2466,7 @@ fastfloat_really_inline void round(adjusted_mantissa& am, callback cb) noexcept if (-am.power2 >= mantissa_shift) { // have a denormal float int32_t shift = -am.power2 + 1; - cb(am, std::min(shift, 64)); + cb(am, std::min(shift, 64)); // check for round-up: if rounding-nearest carried us to the hidden bit. am.power2 = (am.mantissa < (uint64_t(1) << binary_format::mantissa_explicit_bits())) ? 0 : 1; return;