From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id 78CE0382EA30; Sun, 18 Sep 2022 10:48:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 78CE0382EA30 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x62f.google.com with SMTP id u9so58520815ejy.5; Sun, 18 Sep 2022 03:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date; bh=Ec7cfkJyFotj4dhQ6cwuX9vilYu31k5qv8G+k6Hge40=; b=KGADlsSQAXCjC5y5gyIjVRseYav1LWAQ4yXUEz2taJ04M/YTbF2xFwmQTEbqNsziN6 b5oErcJ608Kf/y3B4+Z8jOcQstSfJvf/DGAJFbnpOo+eM7NTWNaR7S9U49sPZZmpLhXj Ow+CpleF6h+CCFhkIckEXEUVIau54mwomF8BSTLNa8iYdhOZp77MtCCve9UOm8TNZWja C2W4HOFlayiykRRXhxfkXiwBvAdtCV8gmvOwCgsc7mc1rQdl5HDGpatS7XSRGzOxZU9y IC6d0IQrDuXeoogpEVGuclTYGgJHe1RS3t/sNc3g0zJThXBMRivM8C3Kr+NGBWZAfDWZ tPhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date; bh=Ec7cfkJyFotj4dhQ6cwuX9vilYu31k5qv8G+k6Hge40=; b=ChNsEB/42Si6IXtvhiWrH+RS3OVmZXucQ7mXJ7tyx57R2CfcMVqKqTfXlrJHh7eQ9U 5r+QwUV3dGC5GeuSIsVH4L1FnnTn9NBIJC8TUn3U776t9M7QIWG1SJWfZsOK1EmGAlUJ h0eyFmqb6jJSgW/5lhdOoyosozGR0AzQkuUmDDwCADLsmVRL6E2Zfng2HKJwJdQ7zW5Z bjv5+YIbUGQvRFCKe8O7vw2K689sE3gl6H9NCRmZkzIfO1/VFL9Qc1aKz/wILlzQP+KQ ldTvsyH9HyWxhDDf4rJlKRE69iUtF5LgCDp9WSrFMMO3PILxDmnEGwmTwR8bVV31ln7b Ov5A== X-Gm-Message-State: ACrzQf3r+xJT6P95qMEdfc8wUkUrpO4t6aXA75H1YVLzHLbCpzsS25CK FNxF5OEScKeThKydghWoE27V6LEqhkbnnQ== X-Google-Smtp-Source: AMsMyM6ra5V4w+3aFiy+w2yHWxZi6It9x1wpBcMrR17NSCx2U15KOlU9bLVMgSOZG5pmL+DOna6Kew== X-Received: by 2002:a17:907:8a1a:b0:780:ee1:b71e with SMTP id sc26-20020a1709078a1a00b007800ee1b71emr9727732ejc.474.1663498100587; Sun, 18 Sep 2022 03:48:20 -0700 (PDT) Received: from smtpclient.apple (vpn-konference.ms.mff.cuni.cz. [195.113.20.101]) by smtp.gmail.com with ESMTPSA id ku5-20020a170907788500b00773f3cb67ffsm13571467ejc.28.2022.09.18.03.48.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Sep 2022 03:48:19 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Richard Biener Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 09/10] fortran: Support clobbering of variable subreferences [PR88364] Date: Sun, 18 Sep 2022 12:48:19 +0200 Message-Id: References: Cc: Thomas Koenig , Mikael Morin , gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org In-Reply-To: To: Mikael Morin X-Mailer: iPhone Mail (19H12) X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 List-Id: > Am 18.09.2022 um 11:10 schrieb Mikael Morin : >=20 > =EF=BB=BFLe 18/09/2022 =C3=A0 08:12, Richard Biener a =C3=A9crit : >>> On Sat, Sep 17, 2022 at 9:33 PM Mikael Morin wr= ote: >>>=20 >>> Le 17/09/2022 =C3=A0 19:03, Thomas Koenig via Fortran a =C3=A9crit : >>>>=20 >>>> I have a concern about this part, though. My understanding at the >>>> time was that it is not possible to clobber an individual array >>>> element, but that this clobbers anything off the pointer that this >>>> is based on. >>>>=20 >>> Well, we need the middle-end guys to give a definitive answer on this >>> topic, but I think it would be a very penalizing limitation if that was >>> the case. I have assumed that the clobber spanned the value it was >>> applied on, neither more nor less, so just the array element in case of >>> array elements. >> There is IL verification that the LHS of a CLOBBER is either >> a declaration or a pointer dereference, no array or component >> selection is allowed there. Now, nothing should go wrong here, >> but we might eventually just drop those CLOBBERs or ICE if >> we frontend hands us an "invalid" one. >=20 > Obviously I have assumed too much here; it's probably best to drop this pa= tch. > It is unfortunate as there is some desirable behavior within reach here. T= he test shows that the patch permits the elimination of a useless store. An= d IL verification doesn't seem that upset with it by the way. > Does *(&a[1]) count as a pointer dereference? Yes, technically. > Even in the original dump it is already simplified to a straight a[1]. But this not anymore. The check can probably be relaxed, it stems from the d= ual purpose of CLOBBER. Richard=20=