From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by sourceware.org (Postfix) with ESMTPS id D957D3857B86; Fri, 15 Mar 2024 17:27:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D957D3857B86 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmx.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D957D3857B86 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=212.227.17.20 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710523625; cv=none; b=VnHkMbcSlhtFJj3H7cJkJ3frn+k6ZFr/d0DBTah2FD9siwf8zk0Zomu/aqDMT47yrcun6aiEIyNg7n+pOIrh8Dx9h/8gW8XAFlmU9qjE1kbWOkv7tnSRVXBQE4Woo6B9IlSoxCZ9+2nrZYuRL3RqohgRr/1iqUV8zIvDcBFJbvU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710523625; c=relaxed/simple; bh=ZqF9wT7AN9wczgL7X9AnyE7C4qKnCSJETFFdRh8n0mE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=FozdhPD1r5EktExz6bhArypZwkS9fThfD0UQxEzKqlBA1VqEiJHLZfvIgcHBHin018ZHSUPMAjJp6bMd1tjKwc4876QIUtOyuBeqUiR0Jynm+FtwMkduEjKSJ/GiIXKEwmmM4lgJyTn9sy7jsQZdD1DjIXX6gogdR+YezObHJIg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1710523612; x=1711128412; i=anlauf@gmx.de; bh=GP68grgLSZaO12P5VTGdyAnrjcLqUGBlew1AN2m9e2k=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=ADLGEKLfoZqJbG1PcjcpD6xnkppLIlOTQloFj3Q35E2mMox3yez1FycEsXi/iLLX 6Ykznyne0i5SDg8fljGpCoYz40Yz3oHbZ6jzhnsL61HLiQX/9XTkBB1Rf4fcW7PwG YSN/JTf05f/u36GB2MgqJX++E/ci4Be+zyV64XPq9lkwrvlIaQ1RErJeFp5+56mqB 00Tdple2bb2ewUTVCC1rneHhXODEZTSE5ztZKuFAbXOAYP+fnQEVYvutAIGMTKWkI wWBpoIGBk3t4Xu4SnrH9Boc/+zP2uHjZHDVjVj2i3rciGRyZ46eqN1X5oYNfpiowo SLn7dUhUvp8hQuP9KQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.178.29] ([79.251.3.31]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MRCOK-1rOAGG37x6-00NASw; Fri, 15 Mar 2024 18:26:52 +0100 Message-ID: Date: Fri, 15 Mar 2024 18:26:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH, v2] Fortran: use name of array component in runtime error message [PR30802] To: Mikael Morin , sgk@troutmask.apl.washington.edu Cc: fortran , gcc-patches Newsgroups: gmane.comp.gcc.patches,gmane.comp.gcc.fortran References: <67c77b44-79cb-4029-b59a-c92dfad15fa9@orange.fr> <86888cc5-3650-4044-b67d-89aab1631753@gmx.de> <70fc4304-74b4-4d8c-8172-9c3286bc9ada@gmx.de> <50f2a7c0-55af-4079-9f6f-41dc6497c234@orange.fr> <04f84bdb-4589-444a-93af-9e252908da93@orange.fr> <6d15efdc-cc99-4008-b0e7-9091a9cebced@orange.fr> Content-Language: en-US From: Harald Anlauf In-Reply-To: <6d15efdc-cc99-4008-b0e7-9091a9cebced@orange.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:JZ8aaKHkhMU47cXRorrWOv7Wu8+sr7LR4Z8odmHx3VD5W2Tqgi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No, score=-4.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Hi Mikael, On 3/15/24 17:31, Mikael Morin wrote: > Le 10/03/2024 =C3=A0 22:31, Harald Anlauf a =C3=A9crit=C2=A0: >> Dear all, >> >> after playing for some time with NAG and Intel, and an off-list >> discussion with Jerry, I am getting more and more convinced that >> simpler runtime error messages (also simpler to parse by a human) >> are superior to awkward solutions.=C2=A0 This is also what Intel does: >> use only the name of the array (component) in the message whose >> indices are out of bounds. >> >> (NAG's solution appears also inconsistent for nested derived types.) >> >> So no x%z, or x%_data, etc. in runtime error messages any more. >> > That's a pity.=C2=A0 What about providing the root variable and the fail= ing > component only? > > ... dimension 1 of array component 'z...%x' above array bound ... > > The data reference doesn't look great, but it provides valuable (in my > opinion) information. OK, that sounds interesting. To clarify the options: - for ordinary array x it would stay 'x' - when z is a DT scalar, and z%x is the array in question, use 'z%x' (here z...%x would look strange to me) - when z is a DT array, and x some component further down, 'z...%x' I would rather not make the error message text vary too much to avoid to run into issues with translation. Would it be fine with you to have ... dimension 1 of array 'z...%x' above array bound ... only? Anything else? Cheers, Harald >> Please give it a spin... >> >> Regtested on x86_64-pc-linux-gnu.=C2=A0 OK for mainline? >> >> Thanks, >> Harald >> >> >> On 1/30/24 11:46, Mikael Morin wrote: >>> Le 30/01/2024 =C3=A0 11:38, Mikael Morin a =C3=A9crit=C2=A0: >>>> >>>> Another (easier) way to clarify the data reference would be rephrasin= g >>>> the message so that the array part is separate from the scalar part, >>>> like so (there are too many 'of', but I lack inspiration): >>>> Index '0' of dimension 1 of component 'zz' of element from 'x1%vv' >>>> below lower bound of 1 >>>> >>> This has the same number of 'of' but sounds better maybe: >>> Out of bounds accessing component 'zz' of element from 'x1%yy': index >>> '0' of dimension 1 below lower bound of 1 >>> > >