From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by sourceware.org (Postfix) with ESMTPS id ABBFF385702E; Mon, 29 Mar 2021 09:15:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org ABBFF385702E Received: by mail-lf1-x132.google.com with SMTP id m12so17344929lfq.10; Mon, 29 Mar 2021 02:15:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y3AhlMKMleTCZabf/s/wGNDeFRWzaS4It/SKK+UV2uE=; b=S9lXNtFsPFM0H8SUgYAq0IX7OlLsF5voZLYXkNC+fvtjBXPUUHep1wRKaV2VpBIkBg +YtsHTXix2EkMFwyAwSyHvNup0eUQIh+aU1NWTYHqgV4XYjyPj0jf8k/hljXv7kHfi+d iiGoH8sn0GTT/4mRdu56dxLBI4yYPOTg+6V+Ip5GTwRvcgFAFAZTfDIQimvydBKPedav 7pZe5gKV9McORDFM6MaBjK+Ewk3rLe/BrNfQqEn2fYd1O56KVWYugUQlDiaC4FEYsTp/ U8wmk6IuBQ6njg0WsQA4K/UeKcbvTeAB02SpmvSWe9yC0xU5AXCacG+Av8Nr4U2dBvCI yEBg== X-Gm-Message-State: AOAM530yYoynKN/1a1A9xi0vtCCqs8CtKAjXVOgdL2eQ+7Yl0Khs5sbv wDjPBg1nVyLiDREruNvEmqF755VGtZ5jYz1c4ZE= X-Google-Smtp-Source: ABdhPJx37t7wFYRkadZns3TiRMrxBWDAwu0q8jgQ+rT1q5N+NCsPVnVnU8t+/7yPwEn/xzmZkk4ZBNHD+W0mW38m/QM= X-Received: by 2002:a05:6512:1155:: with SMTP id m21mr16376125lfg.44.1617009333331; Mon, 29 Mar 2021 02:15:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Paul Richard Thomas Date: Mon, 29 Mar 2021 09:15:21 +0000 Message-ID: Subject: Re: [Patch, fortran] PR99602 - [11 regression] runtime error: pointer actual argument not associated To: Tobias Burnus Cc: "fortran@gcc.gnu.org" , gcc-patches , =?UTF-8?Q?J=C3=BCrgen_Reuter?= X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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, 29 Mar 2021 09:15:36 -0000 Hi Tobias, An earlier version of the patch, without the exclusion of unlimited polymorphic expressions caused several regressions. However, omitting the exclusion now causes no regressions. I forgot to go back to this wrinkle. I have included your testcases with appropriate attribution and pushed as 297363774e6a5dca2f46a85ab086f1d9e59431ac . Thanks for the review and the additional testcases. Paul On Fri, 26 Mar 2021 at 11:22, Tobias Burnus wrote= : > Hi Paul, > > I do not understand the !UNLIMITED_POLY(fsym) part of the patch. > In particular, your patch causes foo.f90 to fail by wrongly diagnosting: > > Fortran runtime error: Pointer actual argument 'cptr' is not associate= d > > I have only did some light tests =E2=80=93 but it seems that just removin= g > '&& !UNLIMITED_POLY(fsym)' seems to be enough. (But I did not run > the testsuite.) > > Hence: > - Please include the attached testcases or some variants of them. > - Check that removing !UNLIMITED_POLY does not cause any regressions > > If that works: OK for mainline > > Thanks for looking into this issue and working on the patches. > > Tobias > > On 26.03.21 07:58, Paul Richard Thomas via Fortran wrote: > > This patch is straightforward but the isolation of the problem was rath= er > > less so. Many thanks to Juergen for testcase reduction. > > > > Regtested on FC33/x86_64 - OK for master? > > > > Paul > > > > Fortran: Fix problem with runtime pointer chack [PR99602]. > > > > 2021-03-26 Paul Thomas > > > > gcc/fortran/ChangeLog > > > > PR fortran/99602 > > * trans-expr.c (gfc_conv_procedure_call): Use the _data attrs > > for class expressions and detect proc pointer evaluations by > > the non-null actual argument list. > > > > gcc/testsuite/ChangeLog > > > > PR fortran/99602 > > * gfortran.dg/pr99602.f90: New test. > > * gfortran.dg/pr99602a.f90: New test. > > * gfortran.dg/pr99602b.f90: New test. > ----------------- > Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 M=C3=BCnchen > Registergericht M=C3=BCnchen HRB 106955, Gesch=C3=A4ftsf=C3=BChrer: Thoma= s Heurung, Frank > Th=C3=BCrauf > --=20 "If you can't explain it simply, you don't understand it well enough" - Albert Einstein