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