From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cc-smtpout1.netcologne.de (cc-smtpout1.netcologne.de [89.1.8.211]) by sourceware.org (Postfix) with ESMTPS id 315A13858D37; Wed, 27 Apr 2022 05:48:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 315A13858D37 Received: from cc-smtpin1.netcologne.de (cc-smtpin1.netcologne.de [89.1.8.201]) by cc-smtpout1.netcologne.de (Postfix) with ESMTP id B34CC129DF; Wed, 27 Apr 2022 07:48:29 +0200 (CEST) Received: from [IPV6:2001:4dd7:f207:0:7285:c2ff:fe6c:992d] (2001-4dd7-f207-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de [IPv6:2001:4dd7:f207:0:7285:c2ff:fe6c:992d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by cc-smtpin1.netcologne.de (Postfix) with ESMTPSA id 23F1511D92; Wed, 27 Apr 2022 07:48:24 +0200 (CEST) Message-ID: Date: Wed, 27 Apr 2022 07:48:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: *PING* [PATCH 0/4] Use pointer arithmetic for array references [PR102043] Content-Language: en-US To: Hans-Peter Nilsson , morin-mikael@orange.fr Cc: mikael@gcc.gnu.org, gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org, stefansf@linux.ibm.com References: <20220416165618.236666-1-mikael@gcc.gnu.org> <6d835381-a1f8-d4fa-3e43-efb30961d831@orange.fr> <20220426144033.723E720430@pchp3.se.axis.com> From: Thomas Koenig In-Reply-To: <20220426144033.723E720430@pchp3.se.axis.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-NetCologne-Spam: L X-Spamd-Bar: --- X-Rspamd-Queue-Id: 23F1511D92 X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Wed, 27 Apr 2022 05:48:33 -0000 On 26.04.22 16:40, Hans-Peter Nilsson wrote: > These, or specifically r12-8227-g89ca0fffa48b79, "fortran: > Pre-evaluate string pointers. [PR102043]" have further > exposed (the issue existed before but now fails for more > platforms) PR78054 "gfortran.dg/pr70673.f90 FAILs at -O0", > at least for cris-elf and apparently also > s390x-ibm-linux-gnu. > > In the PR it is mentioned that running the test through > valgrind shows invalid accesses also on x86_64-linux-gnu. > Could it be that the test-case is invalid and has undefined > behavior? I don't know fortran so I can't tell. You're right. I just looked at the test case and can confirm what Steve Kargl observed in the PR, it is in fact invalid. You cannot do a = a after deallocating a. I've assigned the PR to myself and will commit the change to dg-do compile soon (unless anybody objects). Best regards Thomas