From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by sourceware.org (Postfix) with ESMTPS id D3BE13858D28; Thu, 2 Nov 2023 20:35:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D3BE13858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmx.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D3BE13858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=212.227.17.22 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698957341; cv=none; b=NsdkqWovcTKGS4Nar7APkeSWZa7zQ6pSeLOPL+8UEIwJQdO69XJCuTtqh+UyowFiLQqZ1HSkiWuolzYq7VsACf/9dtbYoLmieM4gYK5gjhSyJWkWxfZCtFxzXhYIsVZ7vB8cb8EeNY6HYoD8gQu7oZXORX+8HbYF9Jm8Km3pAcM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698957341; c=relaxed/simple; bh=Q7F5yubtgNywp0fwsdApx9V9nMOcrKkawnng5J+4rZc=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=q+OKqgaogCPLgW0XE6Dig7+GDAXbQlJKMt6ZjOMdfLMK+3ui3k5OiAgxLJVPCuehiBCpb03eOMLnomkMna5FCguesvKMcrhwbvu7ifljVce8CGVonQFulRWaCvUpCu28Qwqwmo1fzWrGCZ4DsfdhtRDf11oFWOWBr1MHwUFtnfw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1698957327; x=1699562127; i=anlauf@gmx.de; bh=Q7F5yubtgNywp0fwsdApx9V9nMOcrKkawnng5J+4rZc=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=pBM5t+IHp0vMx0IvA/FVsaFkVEz/DgTSIbsk+blzSorFIlvrR2J7+F545Ct8oFhw WmWN754atkhegoFFAax7v7JguDaxQZWf6G602vpNe1xJjwk2dX8DHJkLENNqcgfjo EdeOE2/zAtKYNmaqCp84ow64eSgKFtjUtva+pxLDP4sB5gcw6iJJMTEu8QDBjqElv UU2dkxgYiuScAxmiU5WgvD2+hTa9SnMKk+ns1/JyAORa+l8C4swmuj673yVE3kzeL wWZJUnI8qVI1l889UZUOc3060IyO4lvVC042acyiYNKeI+JYrNyvz8NCsx9RWpeIB buC8EGIkEok121SPrA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.178.29] ([79.232.151.13]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MqJmF-1rm48C2d0d-00nMxs; Thu, 02 Nov 2023 21:35:27 +0100 Message-ID: <961bf613-316c-449b-87fe-bae6f1798410@gmx.de> Date: Thu, 2 Nov 2023 21:35:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Patch, fortran] PR98498 - Interp request: defined operators and unlimited polymorphic To: Paul Richard Thomas Cc: "fortran@gcc.gnu.org" , gcc-patches Newsgroups: gmane.comp.gcc.patches,gmane.comp.gcc.fortran References: <97147ff1-9d5b-4f0c-8a28-22d454d0476c@gmx.de> Content-Language: en-US From: Harald Anlauf In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Ave3xvcgu89QHCL/qjjAYIYbXF2615FsOf+ypO2PpYG1wK7bK/6 5VeQ80kvmqoZ6m8DnW+acCGQJrWy4XXvozKslw6r4fKStKRcRj1M6phG31AOmxUx5qHlVHo MqKe/jEpny4m5AE8C/TepQrroNrVkccqF4tSGtQ5HuGP5iyHbDaK//i1O7cTN3afSci9fNq y/9CVIhIk8q9novsJRsdw== UI-OutboundReport: notjunk:1;M01:P0:5kSKXBvwQZs=;N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VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Hi Paul, Am 02.11.23 um 19:18 schrieb Paul Richard Thomas: > Hi Harald, > > I was overthinking the problem. The rejected cases led me to a fix that = can > only be described as a considerable simplification compared with the fir= st > patch! this patch is *much* simpler, makes more sense, and works here. :-) > The testcase now reflects the requirements of the standard and > regtests without failures. > > OK for mainline? Yes, OK for mainline. Thanks, Harald > Thanks > > Paul > > Fortran: Defined operators with unlimited polymorphic args [PR98498] > > 2023-11-02 Paul Thomas > > gcc/fortran > PR fortran/98498 > * interface.cc (upoly_ok): Defined operators using unlimited > polymorphic formal arguments must not override the intrinsic > operator use. > > gcc/testsuite/ > PR fortran/98498 > * gfortran.dg/interface_50.f90: New test. > > > On Wed, 1 Nov 2023 at 20:12, Harald Anlauf wrote: > >> Hi Paul, >> >> Am 01.11.23 um 19:02 schrieb Paul Richard Thomas: >>> The interpretation request came in a long time ago but I only just got >>> around to implementing it. >>> >>> The updated text from the standard is in the comment. Now I am writing >>> this, I think that I should perhaps use switch(op)/case rather than us= ing >>> if/else if and depending on the order of the gfc_intrinsic_op enum bei= ng >>> maintained. Thoughts? >> >> the logic is likely harder to parse with if/else than with >> switch(op)/case. However, I do not think that the order of >> the enum will ever be changed, as the module format relies >> on that very order. >> >>> The testcase runs fine with both mainline and nagfor. I think that >>> compile-only with counts of star-eq and star_not should suffice. >> >> I found other cases that are rejected even with your patch, >> but which are accepted by nagfor. Example: >> >> print *, ('a' =3D=3D c) >> >> Nagfor prints F at runtime as expected, as it correctly resolves >> this to star_eq. Further examples can be easily constructed. >> >> Can you have a look? >> >> Thanks, >> Harald >> >>> Regtests with no regressions. OK for mainline? >>> >>> Paul >>> >>> Fortran: Defined operators with unlimited polymorphic args [PR98498] >>> >>> 2023-11-01 Paul Thomas >>> >>> gcc/fortran >>> PR fortran/98498 >>> * interface.cc (upoly_ok): New function. >>> (gfc_extend_expr): Use new function to ensure that defined >>> operators using unlimited polymorphic formal arguments do not >>> override their intrinsic uses. >>> >>> gcc/testsuite/ >>> PR fortran/98498 >>> * gfortran.dg/interface_50.f90: New test. >>> >> >> >