From patchwork Thu Apr 13 20:56:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Anlauf X-Patchwork-Id: 83089 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1314968vqo; Thu, 13 Apr 2023 13:58:09 -0700 (PDT) X-Google-Smtp-Source: AKy350ZgF7ULRvOfUJOYu4r1g171s5+IEylx/19bsz4NfMoDjAszuAyTbMoMdgTdm2nMgs7bEdj2 X-Received: by 2002:a17:906:1c97:b0:94a:58a5:2300 with SMTP id g23-20020a1709061c9700b0094a58a52300mr4250635ejh.27.1681419489194; Thu, 13 Apr 2023 13:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681419489; cv=none; d=google.com; s=arc-20160816; b=qThbWKBfYn2rpnGcIi46ZZFKjCzB1s77VybgmZ1eU731uIyTeM8fS7oV7xoyihls+y jThD+e/dsb3tSOHszHZytJH8XTvzM0Q35nQbYj5/Eq+kTRmfVHJu7/10B277782sbAwH 5ToUhOEFcObTtGp/jfDARbhd6Bd1HwDaVt5vyyE0E2cTL9SHyHAV2ZauAnK2NyqbBPXz w4vEun3WAavxOpR6044mYD9IfaOQgCxntq0c2sok16ul//wkBjE+Bjq0dqYf1afdI52z swAOsHPxPjXVAQIStJg0TOat/H+9w9SWvIlfpTsU+w5h/UkruYj2RHuNHFwh9E5lsO1b +JOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:ui-outboundreport :sensitivity:importance:date:subject:to:message-id:mime-version :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=7iZ6atJCBVJM4OIiNaCyEwHc2FkuBb4Gps3v3PF0PJ0=; b=NRpDPwoIl6c1IOYObZk71U3QpMhG3Ze6xmEYeJ9PdRPSLBZ06D7lobGLl5SI3w7Uk2 Akq/3Qe53wWcFb7rkm8SXePNeO+BbAlRhD8ttEE2HqFi/V5pAm4E+AA6SH2t7W7A2Dh4 hWQ+t3ebW1Bcy8TQWP/sRWvgHh709bu0vIwb6pik5vtYFewKPXK1oxtY/1iubMva2yqw MZAgp4OA3bTXtPimXtOuybZ7Pa9M/usqfUMtm1xBJaaZRSxegTBRAF7h1+Y/eH94nj8Z QgC21eBHV9KgDU6gLGvz84tPBYIcTpwgwVahKx3yzj0efFX0iGc/g6t/0/647lCZT7GE o5XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=NgYHsC3J; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ft34-20020a170907802200b0092c8da1e5edsi2408025ejc.611.2023.04.13.13.58.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Apr 2023 13:58:09 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=NgYHsC3J; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 907B5385840C for ; Thu, 13 Apr 2023 20:58:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 907B5385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681419480; bh=7iZ6atJCBVJM4OIiNaCyEwHc2FkuBb4Gps3v3PF0PJ0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=NgYHsC3Jb7w9PL+Q2R3mg2d5W94EEc21lDjJLH+NuH8yuIfZTYYY2bQDPytu0H1+m 5j85cpHIgYHEQ0RKW3FDso/xgZzWNQXEHp106Z3kIMOk+4sPT34yV24fiHc6khiVXa 1enW2EiFZHx7Dy+W1coxKH9ZYlexhhG1Z2/Aa9TQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by sourceware.org (Postfix) with ESMTPS id 750CE3858D20; Thu, 13 Apr 2023 20:56:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 750CE3858D20 X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [79.251.13.145] ([79.251.13.145]) by web-mail.gmx.net (3c-app-gmx-bs50.server.lan [172.19.170.103]) (via HTTP); Thu, 13 Apr 2023 22:56:57 +0200 MIME-Version: 1.0 Message-ID: To: fortran , gcc-patches Subject: =?utf-8?q?=5BPatch=2C_committed=5D_Fortran=3A_call_of_overloaded_?= =?utf-8?q?=E2=80=98abs=28long_long_int=26=29=E2=80=99_is_ambiguous_=5BPR109?= =?utf-8?q?492=5D?= Date: Thu, 13 Apr 2023 22:56:57 +0200 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:QZPg6WI+94vYvoFTsbT/Rsj6A069k5aeWnNJsGIdjPydxqPVUsC+hGuPNzg/z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Mrsiv573yXwALc6RuXBOo9ebDyht90A+G9ICqkUUiL4 4Cxhd0HrFWYTzYM/VQ0X8fwA== X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, 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 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: Harald Anlauf via Gcc-patches From: Harald Anlauf Reply-To: Harald Anlauf Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763096122288807572?= X-GMAIL-MSGID: =?utf-8?q?1763096122288807572?= Dear all, I've committed the attached patch which fixes a portability issue when bootstrapping on Solaris. Discussed and confirmed in the PR by Jonathan for Solaris and regtested by me on x86_64-pc-linux-gnu. https://gcc.gnu.org/g:43816633afd275a9057232a6ebfdc19e441f09ec (Unfortunately the commit message contains Unicode characters that I got by using copy&paste of the error message. I wonder if "git gcc-verify" could have warned me ...) Thanks, Harald From 43816633afd275a9057232a6ebfdc19e441f09ec Mon Sep 17 00:00:00 2001 From: Harald Anlauf Date: Thu, 13 Apr 2023 22:42:23 +0200 Subject: [PATCH] =?UTF-8?q?Fortran:=20call=20of=20overloaded=20=E2=80=98ab?= =?UTF-8?q?s(long=20long=20int&)=E2=80=99=20is=20ambiguous=20[PR109492]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc/fortran/ChangeLog: PR fortran/109492 * trans-expr.cc (gfc_conv_power_op): Use absu_hwi and unsigned HOST_WIDE_INT for portability. --- gcc/fortran/trans-expr.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc index 79367fa2ae0..09cdd9263c4 100644 --- a/gcc/fortran/trans-expr.cc +++ b/gcc/fortran/trans-expr.cc @@ -3400,11 +3400,12 @@ gfc_conv_power_op (gfc_se * se, gfc_expr * expr) && TREE_CODE (TREE_TYPE (rse.expr)) == INTEGER_TYPE) { wi::tree_to_wide_ref wlhs = wi::to_wide (lse.expr); - HOST_WIDE_INT v, w; + HOST_WIDE_INT v; + unsigned HOST_WIDE_INT w; int kind, ikind, bit_size; v = wlhs.to_shwi (); - w = abs (v); + w = absu_hwi (v); kind = expr->value.op.op1->ts.kind; ikind = gfc_validate_kind (BT_INTEGER, kind, false); -- 2.35.3