[PATCH] Fortran: use name of array component in runtime error message [PR30802]
Mikael Morin
morin-mikael@orange.fr
Sun Jan 28 11:39:13 GMT 2024
Le 24/01/2024 à 22:39, Harald Anlauf a écrit :
> Dear all,
>
> this patch is actually only a followup fix to generate the proper name
> of an array reference in derived-type components for the runtime error
> message generated for the bounds-checking code. Without the proper
> part ref, not only a user may get confused: I was, too...
>
> The testcase is compile-only, as it is only important to check the
> strings used in the error messages.
>
> Regtested on x86_64-pc-linux-gnu. OK for mainline?
>
> Thanks,
> Harald
>
Hello,
the change proper looks good, and is an improvement. But I'm a little
concerned by the production of references like in the test x1%vv%z which
could be confusing and is strictly speaking invalid fortran (multiple
non-scalar components). Did you consider generating x1%vv(?,?)%zz or
x1%vv(...)%z or similar?
There is another nit about the test, which has dg-output and
dg-shouldfail despite being only a compile-time test.
Otherwise looks good.
Mikael
More information about the Fortran
mailing list