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: 1768645 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=D7S8JGJT; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PyBjb1Nztz1yZr for ; Fri, 14 Apr 2023 06:57:38 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5004E3858D33 for ; Thu, 13 Apr 2023 20:57:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5004E3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681419456; bh=7iZ6atJCBVJM4OIiNaCyEwHc2FkuBb4Gps3v3PF0PJ0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=D7S8JGJTm+naL6Wqqvd2OaIL4qS0VNyfo/hWzng/w5spnEdERxExMPuXn+ZFeQCFo 6EuJtYebZpC4Wh82dJHXDydb66mdTGNkSUL6Fx2r44+Kg9HSz2BKM+Wlq9wul7LzcC q8us9YIEQggkQUh5bVF2JsHzvtdest8fQJbOcxZI= 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/zwhUrqmAi nScr1iggTIhtMxi54MxtNsQlZAQclvcFLYu9fuyhUSp09GWIB7w4JU1UWq/LHGA5mRczS1vHRWY8 P/sZePPlFGBNCnXvsmTS2cZdjfmnnEQF1xU1zTEYPQIQAoL7q73yoUrULtfRUpOdP7x3AGNUSgax 81Ro5BKdd31z40GbF0TMLGhEv79yvQ3W81NK9FyxOpibIYVuZFbo0aynbe+3Xu1d4aXEFejYPAjw 8U= UI-OutboundReport: notjunk:1;M01:P0:AV+2iheZkXg=;7SW0HJ+HQ4yDjC6iLzdJk+MoM8W E+SzNxTWfu1R+PE9zT1Cgi2f4iAYPnq7qDkpbzX463s40+CjJZAx3h6MvsQYaNG7GapVI4QDF 2GN2xCXUeUxiAzdUCOHT6Hz6HGS+cr+/1wJr7iUU8FcMICw1OjIWy9lEB4K6EjfNh7ek9J+gT 4SUC57xZRc6yeiR78q2eis91uzXXi4exVHn/qXB4Awn9gI47Om3ONGNXWfEBRUnvyhlwTdkbf i+r8dgL6X+Nw0AZGdjufxJChOoibRdy/SLL8BDRJPz3/pgrzqIDQTy5ETpw/MPiIhJ78oin0d mdQi0DGQ5YCMENFWVcRyIVc1Lx3x6Xj4wX0qHlvOKpoVbjcvcta8KAM0OkathgxX3P2yRpCq8 9y6wBzynkeJqgaeAf7I2i8+2SE13mdFzJXTe/YxS3eMFxraIzEMBpajKWCyUbu7PqEvw68WUS iFA4yWnUZ/Iy/6AhUMkS2TZOaqDI99l/91mCTtpBEgOO3gqE5wmoiGx6d1PFijZdtEUxxn2eS 76jZbdq+K2/s4OLUJ5wwDzX/FnJB2EIyNCdUmzG0DcHq5ItqbnNsB1FJYr+G7ItadrmdsTh3j KYD2/WS0Kardl6+LjUgrdCy52PvF8C9HrcopaUmmWl8CpsJ3ut2g8RPch24hO64EbvWXwino/ Zbgclce6UVn1PgnHllRguIqqXKBijs+//Bf3EM+gyC6OBOmNKyqCis6F9Ku0CXU0gPw7inNKv TAzT3s7mUcKZrn6/ZR/SlsqYnONZa8Mrsiv573yXwALc6RuXBOo9ebDyht90A+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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" 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