From: Mikael Morin <morin-mikael@orange.fr>
To: Harald Anlauf <anlauf@gmx.de>, sgk@troutmask.apl.washington.edu
Cc: fortran <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH, v2] Fortran: use name of array component in runtime error message [PR30802]
Date: Fri, 15 Mar 2024 17:31:47 +0100 [thread overview]
Message-ID: <6d15efdc-cc99-4008-b0e7-9091a9cebced@orange.fr> (raw)
In-Reply-To: <b8f97c9f-e5c4-41e9-9141-e342898e6599@gmx.de>
Le 10/03/2024 à 22:31, Harald Anlauf a écrit :
> 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. 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. What about providing the root variable and the failing
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.
> Please give it a spin...
>
> Regtested on x86_64-pc-linux-gnu. OK for mainline?
>
> Thanks,
> Harald
>
>
> On 1/30/24 11:46, Mikael Morin wrote:
>> Le 30/01/2024 à 11:38, Mikael Morin a écrit :
>>>
>>> Another (easier) way to clarify the data reference would be rephrasing
>>> 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
>>
next prev parent reply other threads:[~2024-03-15 16:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 21:39 [PATCH] " Harald Anlauf
2024-01-28 11:39 ` Mikael Morin
2024-01-28 19:56 ` Harald Anlauf
2024-01-28 21:43 ` Steve Kargl
2024-01-29 6:51 ` rep.dot.nop
2024-01-29 17:25 ` Harald Anlauf
2024-01-29 20:50 ` Harald Anlauf
2024-01-30 10:38 ` Mikael Morin
2024-01-30 10:46 ` Mikael Morin
2024-03-10 21:31 ` [PATCH, v2] " Harald Anlauf
2024-03-15 16:31 ` Mikael Morin [this message]
2024-03-15 17:26 ` Harald Anlauf
2024-03-15 19:29 ` Mikael Morin
2024-03-20 20:24 ` [PATCH, v3] Fortran: improve array component description " Harald Anlauf
2024-03-21 13:07 ` Mikael Morin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6d15efdc-cc99-4008-b0e7-9091a9cebced@orange.fr \
--to=morin-mikael@orange.fr \
--cc=anlauf@gmx.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=sgk@troutmask.apl.washington.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).