From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.smtpout.orange.fr (smtp08.smtpout.orange.fr [80.12.242.130]) by sourceware.org (Postfix) with ESMTPS id D81F4385828B for ; Mon, 25 Jul 2022 10:43:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D81F4385828B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orange.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=orange.fr Received: from [192.168.1.17] ([86.215.161.154]) by smtp.orange.fr with ESMTPA id FvYcoZ38Mc1nnFvYio70Rv; Mon, 25 Jul 2022 12:43:35 +0200 X-ME-Helo: [192.168.1.17] X-ME-Auth: MDU4MTIxYWM4YWI0ZGE4ZTUwZWZmNTExZmI2ZWZlMThkM2ZhYiE5OWRkOGM= X-ME-Date: Mon, 25 Jul 2022 12:43:35 +0200 X-ME-IP: 86.215.161.154 Message-ID: <8e300265-e24c-59c2-19b0-3d74fc5ed425@orange.fr> Date: Mon, 25 Jul 2022 12:43:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 From: Mikael Morin Subject: Re: [PATCH] Fortran: fix invalid rank error in ASSOCIATED when rank is remapped [PR77652] To: Harald Anlauf , fortran , gcc-patches References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, FREEMAIL_FROM, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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: Mon, 25 Jul 2022 10:43:39 -0000 Le 21/07/2022 à 22:12, Harald Anlauf via Fortran a écrit : > Dear all, > > the rank check for ASSOCIATED (POINTER, TARGET) did not allow all > rank combinations that were allowed in pointer assignment for > newer versions of the Fortran standard (F2008+). Fix the logic. > So, if I understand correctly the (fixed) logic, it is: f2008+ => no check f2003 => check target’s rank different from 1 up to f95 => check pointer’s rank equals target’s I think one check is missing, that is when pointer is scalar and the target is non-scalar (either rank 1 or not). This case should also be rejected for f2003+, not just up to f95. Mikael