From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id B865D3857829; Thu, 18 Mar 2021 08:46:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B865D3857829 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Tobias_Burnus@mentor.com IronPort-SDR: 9aR8ql2NEtoYIdxkWxcGvy9dk7nYKNgyZDOWCMMBmUJIe/Jf41PkXiTUEusU2remahzILNa7M9 Zg/GsmR0d/bRK/7UEppJnw9uYpT5Re/+J/tT59ll3vsVoXr4+RAZ8P3lwskI3MrVyUQI3bUif9 jYqQrLYC/zVJy4zTKitXyGLB7e2sHFnwzp2jG+Wfe0v/7EvJsA+dpuXl19l6poNHdC925Iol5b DhcDn42g00yV5HaFYACYK2S98ttFu12RwFC0lkbit9jISTh9zWkvAv8vDP1R4CtX0pCbA7wRa8 OFQ= X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="59218288" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 18 Mar 2021 00:46:36 -0800 IronPort-SDR: O1MPiae2XU1zQ4sOx4+QYL0yc//OpOiyQJ/qFIMMeRx2rcTowJ9KMOpHF2CmVmZ1sdTpbRZwfX ix19w1QbEr34Jb6OFOw+K8Gz9U6P5l7Wiv8OTpiSCRYf9JzCGnynwb1buYpRATxeqC+GcUbp0R DkIFprsLULWV8H84x9cw+YB9qH4nkUVL1B0HvD5Zp3XjLeWcCBVsG+sLD5fBTe4yFim9yVPXty wnVIWInMot03k/g6SzS0Ho78xUF74B4WuFirtjhqZLMkKXS2nCckn+0jykKGwx8VRF5R+N3z7/ u0M= Subject: Re: [Patch, fortran] PR99602 - [11 regression] runtime error: pointer actual argument not associated From: Tobias Burnus To: Paul Richard Thomas , "fortran@gcc.gnu.org" , gcc-patches CC: =?UTF-8?Q?J=c3=bcrgen_Reuter?= , Harald Anlauf References: <4ee532b7-eed8-8dd7-4e01-9a2e8004007c@codesourcery.com> Message-ID: <2c797dfe-a401-0f2a-b121-e6ba0c98179b@codesourcery.com> Date: Thu, 18 Mar 2021 09:46:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <4ee532b7-eed8-8dd7-4e01-9a2e8004007c@codesourcery.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Thu, 18 Mar 2021 08:46:40 -0000 Hi Paul, hi all fortran@/gcc-patch@ reader, it looks as if you replied with your patch submission to the wrong email address =E2=80=93 and your re-submission ended up at https://gcc.gnu.org/PR= 99602#c17 On 16.03.21 18:08, Tobias Burnus wrote: > On 16.03.21 17:42, Paul Richard Thomas via Gcc-patches wrote: >> Fortran: Fix runtime errors for class actual arguments [PR99602]. >> * trans-array.c (gfc_conv_procedure_call): For class formal >> arguments, use the _data field attributes for runtime errors. >> * gfortran.dg/pr99602.f90: New test. > Shouldn't there be also a testcase which triggers this run-time error? Note: The new submission consists of a new testcase (now two) and the actual patch; the new testcase removes 'pointer' from the dummy argument of prepare_m2_proc/prepare_whizard_m2 and checks via the -ftree-original-dump that there is now run-time check code inserted when passing a (nullified) pointer to a nonpointer dummy argument. Compared to previous patch, 'fsym_attr.pointer =3D fsym_attr.class_pointer' is new, before it was 'fsym_attr.pointer =3D fsym_attr.pointer'. Paul Richard Thomas wrote in PR99602: > Good morning all, > > I have attached the revised patch and an additional testcase. I had total= ly > forgotten about the class pointer gotcha. > > OK for master? > > Paul > > Fortran: Fix runtime errors for class actual arguments [PR99602 ]. LGTM =E2=80=93 thanks for the patch. I am wondering whether the second testcase should be a 'dg-do run' test instead of 'compile' to ensure that the error is indeed triggered (currently, it only checks the tree dump that a check is inserted). What do you think? [If you do so, you need a dg-shouldfail + dg-output, cf. e.g. pointer_check_5.f90.] Thanks, Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 M=C3=BCnchen R= egistergericht M=C3=BCnchen HRB 106955, Gesch=C3=A4ftsf=C3=BChrer: Thomas H= eurung, Frank Th=C3=BCrauf