From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id E40BE3853829; Tue, 22 Jun 2021 07:11:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E40BE3853829 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: 5kXjFmLZs764HAgUOygvU1alws/spdvunidTL/HPWmAk65ccqOpPPuW+dcWH6wcBZBtDBCO+YA gYfUBNqrvE3cZOmRWqmJFh3IWdxS542xcWo7DQCkNBWQVgB1rOlj9KPVhUSnn3FKdnlI4hSLjQ Sb3j2MN6ZUfAXZYF361fzELXlp+bo3BhhGtFiSjNNH+Oi3j9WXd2v00/jDyEKdD2Nan7ePSlP0 kCctMDGEiR67oW6mmfp8LgHZIyNHsb4FzpXwcobkJqaIN4veL63S6JZdOtaPidZMAmks67+AaW j3Y= X-IronPort-AV: E=Sophos;i="5.83,291,1616486400"; d="diff'?scan'208";a="62639269" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 21 Jun 2021 23:11:15 -0800 IronPort-SDR: klzFMRcnNNGSRNDJjcvDUyIesedqjJFZiyLfPLT7KCGvBeChxhD//sailW5zDMLiqgoJMqJgs5 afI2x9C/6P4WvNnut3YLgaUYzjDgs4Uzqj6vm1m9ifYcOcvNV2jybEwJAq4QRpltb/bi4faYQC sBQ12xMjdmmQT1X86Mt4PZbE7mdrhpFGz9x4WsPcXqY15FUIMJcA9IRE5ghf3diIIDRNcrOeG3 O82JPCgbrSx1bbRCSjD8ouPFv8Qy02KydMnm5QqZZy9m4HUEEcTZJT321NVj3bZNvL6t7Jj5PP 3L4= Subject: Re: [Patch, fortran V2] PR fortran/93308/93963/94327/94331/97046 problems raised by descriptor handling From: Tobias Burnus To: =?UTF-8?Q?Jos=c3=a9_Rui_Faustino_de_Sousa?= , , References: <0b4b1feb-aa45-31ab-9185-546bd0cc551a@gmail.com> <164eff68-d663-f3e3-31b0-ca0349a91dd3@gmail.com> Message-ID: <2e7d2bde-dd2f-29fd-2a7f-d2cdb344529a@codesourcery.com> Date: Tue, 22 Jun 2021 09:11:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------CE2A2748BC2555D11429297A" Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-08.mgc.mentorg.com (139.181.222.8) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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-List-Received-Date: Tue, 22 Jun 2021 07:11:18 -0000 --------------CE2A2748BC2555D11429297A Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable On 21.06.21 22:29, Tobias Burnus wrote: > However, that's independent from the patch you had submitted > and which is fine except for the two tiny nits. As I just did run into a test, which does trigger the error, I think it would be useful to have something like the following on top of your patch =E2=80=93 what do you think? (Two of the changes are the nit changes I mentioned in the LGTM approval.) Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 M=C3=BCnchen R= egistergericht M=C3=BCnchen HRB 106955, Gesch=C3=A4ftsf=C3=BChrer: Thomas H= eurung, Frank Th=C3=BCrauf --------------CE2A2748BC2555D11429297A Content-Type: text/x-patch; charset="UTF-8"; name="patch.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch.diff" diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 52e243bd463..73ce33185f1 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -5616,3 +5616,3 @@ gfc_conv_gfc_desc_to_cfi_desc (gfc_se *parmse, gfc_expr *e, gfc_symbol *fsym) /* Transfer values back to gfc descriptor. */ - if (cfi_attribute != 2 + if (cfi_attribute != 2 /* CFI_attribute_other. */ && !fsym->attr.value diff --git a/libgfortran/runtime/ISO_Fortran_binding.c b/libgfortran/runtime/ISO_Fortran_binding.c index 801b7556765..1b845df0e77 100644 --- a/libgfortran/runtime/ISO_Fortran_binding.c +++ b/libgfortran/runtime/ISO_Fortran_binding.c @@ -56,3 +56,4 @@ cfi_desc_to_gfc_desc (gfc_array_void *d, CFI_cdesc_t **s_ptr) default: - internal_error (NULL, "INVALID CFI DESCRIPTOR"); + runtime_error ("Unallocated, unassociated actual argument to " + "BIND(C) with non-allocatable, non-pointer dummy"); break; @@ -94,3 +95,3 @@ cfi_desc_to_gfc_desc (gfc_array_void *d, CFI_cdesc_t **s_ptr) CFI_index_t lb = 1; - + if (s->attribute != CFI_attribute_other) @@ -134,3 +135,4 @@ gfc_desc_to_cfi_desc (CFI_cdesc_t **d_ptr, const gfc_array_void *s) default: - internal_error (NULL, "INVALID GFC DESCRIPTOR"); + runtime_error ("Unallocated, unassociated actual argument to " + "BIND(C) with non-allocatable, non-pointer dummy"); break; --------------CE2A2748BC2555D11429297A--