From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by sourceware.org (Postfix) with ESMTPS id 0F0E93857400; Fri, 29 Jul 2022 20:01:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0F0E93857400 X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.178.29] ([93.207.83.167]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mq2jC-1neYeU1U5C-00nAMB; Fri, 29 Jul 2022 22:01:56 +0200 Message-ID: <538a3d94-e015-334f-518d-0f024fbd61ba@gmx.de> Date: Fri, 29 Jul 2022 22:01:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH, v2] Fortran: fix invalid rank error in ASSOCIATED when rank is remapped [PR77652] Content-Language: en-US To: Mikael Morin , fortran@gcc.gnu.org Cc: gcc-patches@gcc.gnu.org Newsgroups: gmane.comp.gcc.patches,gmane.comp.gcc.fortran References: <8e300265-e24c-59c2-19b0-3d74fc5ed425@orange.fr> <2c940b18-08f2-adeb-6ac3-22e89b72440d@orange.fr> <5504785b-7471-f51e-852a-5ef9b039cc21@orange.fr> From: Harald Anlauf In-Reply-To: <5504785b-7471-f51e-852a-5ef9b039cc21@orange.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:VVqWsHuvpSxy4qkY7K5uf2t7mU0g3lLfOzodOSU33PsgYR1YDlr JA9RxKNbyxjXvHGRdsn0vFWhcmQkHgVkY1Dt2sJAWQgPWk9wy0WFMC78je0fQNEniSENpmJ coKRnc2oRCAe6pTn2+SFT6KJVwuB4zuazI0qHvIoHvOLlL8znM4bA6v1iYWWFDBwODpBRA1 Kyvdebs9z6k5OjZu3+fiA== X-UI-Out-Filterresults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nEIFRWNWI5R8LC3nOZBojtAKZtNESqERmfoMxZ5XANPVzNvXh0uoV2zLnMekGwcs IDghYdPQ9XVmDmfGf204CupjY473mtCiYcwNxhir5V1GD428VoabLUCnw== X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, NICE_REPLY_A, 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: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2022 20:01:59 -0000 Am 28.07.22 um 22:19 schrieb Mikael Morin: > Hello, > > Le 27/07/2022 =C3=A0 21:45, Harald Anlauf via Fortran a =C3=A9crit=C2=A0= : >> ok, I have thought about your comments in the review process, >> and played with the Cray compiler.=C2=A0 Attached is a refined version >> of the patch that now rejects in addition these cases for which there >> are no possible related pointer assignments with bounds remapping: >> >> =C2=A0=C2=A0 ASSOCIATED (scalar, array) ! impossible, cannot remap boun= ds >> =C2=A0=C2=A0 ASSOCIATED (array, scalar) ! a scalar is not simply contig= uous >> > In principle, it could make sense to construct a one-sized array pointer > (of any rank) pointing to a scalar, but I agree that if we follow the > rules of the standard to the letter, it should be rejected (and we do > reject such a pointer assignment). > So, with this case eliminated, this patch looks good to me as is. OK, so I will push that version soon. > Regarding Toon=E2=80=99s suggestion to ask the fortran committee, it sou= nds > sensible.=C2=A0 I propose to prepare something tomorrow. > Depending on the answer we can later refine the compile-time check and relax if needed. Harald From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by sourceware.org (Postfix) with ESMTPS id 1B07F3857400 for ; Fri, 29 Jul 2022 20:05:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1B07F3857400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1oHWEH-0005AP-SA for fortran@gcc.gnu.org; Fri, 29 Jul 2022 22:05:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: fortran@gcc.gnu.org From: Harald Anlauf Subject: Re: [PATCH, v2] Fortran: fix invalid rank error in ASSOCIATED when rank is remapped [PR77652] Date: Fri, 29 Jul 2022 22:01:55 +0200 Message-ID: <538a3d94-e015-334f-518d-0f024fbd61ba@gmx.de> References: <8e300265-e24c-59c2-19b0-3d74fc5ed425@orange.fr> <2c940b18-08f2-adeb-6ac3-22e89b72440d@orange.fr> <5504785b-7471-f51e-852a-5ef9b039cc21@orange.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Cc: gcc-patches@gcc.gnu.org Content-Language: en-US In-Reply-To: <5504785b-7471-f51e-852a-5ef9b039cc21@orange.fr> Cc: fortran@gcc.gnu.org X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2022 20:05:04 -0000 Message-ID: <20220729200155.8KfQpqFOCzvnBx0adBca1ICbQOKykU6DczAcp7nk4dE@z> Am 28.07.22 um 22:19 schrieb Mikael Morin: > Hello, > > Le 27/07/2022 à 21:45, Harald Anlauf via Fortran a écrit : >> ok, I have thought about your comments in the review process, >> and played with the Cray compiler.  Attached is a refined version >> of the patch that now rejects in addition these cases for which there >> are no possible related pointer assignments with bounds remapping: >> >>    ASSOCIATED (scalar, array) ! impossible, cannot remap bounds >>    ASSOCIATED (array, scalar) ! a scalar is not simply contiguous >> > In principle, it could make sense to construct a one-sized array pointer > (of any rank) pointing to a scalar, but I agree that if we follow the > rules of the standard to the letter, it should be rejected (and we do > reject such a pointer assignment). > So, with this case eliminated, this patch looks good to me as is. OK, so I will push that version soon. > Regarding Toon’s suggestion to ask the fortran committee, it sounds > sensible.  I propose to prepare something tomorrow. > Depending on the answer we can later refine the compile-time check and relax if needed. Harald