[PATCH, v2] Fortran: fix invalid rank error in ASSOCIATED when rank is remapped [PR77652]
Harald Anlauf
anlauf@gmx.de
Wed Jul 27 19:45:46 GMT 2022
Hi Mikael,
Am 26.07.22 um 21:25 schrieb Mikael Morin:
> Le 25/07/2022 à 22:18, Harald Anlauf a écrit :
>> I would normally trust NAG more than Intel and Cray.
> … and yourself, it seems. Too bad.
>
>> If somebody else convinces me to accept that NAG has it wrong this
>> time, I would be happy to proceed.
> It won’t convince you about NAG, but here are two reasons to proceed:
> - Consensus among the maintainers is sufficient; it’s the case here.
> - If uncertain, let’s be rather too permissive than too strict; it’s
> fine as long as the runtime answer is right.
ok, I have thought about your comments in the review process,
and played with the Cray compiler. Attached is a refined version
of the patch that now rejects in addition these cases for which there
are no possible related pointer assignments with bounds remapping:
ASSOCIATED (scalar, array) ! impossible, cannot remap bounds
ASSOCIATED (array, scalar) ! a scalar is not simply contiguous
(Cray would allow those two, but IMHO these should be disallowed).
See attached for version 2 with updated testcase, regtested again.
I think this is what we could both be happy with... ;-)
Thanks,
Harald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr77652-v2.diff
Type: text/x-patch
Size: 4560 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/fortran/attachments/20220727/dd7f853b/attachment-0001.bin>
More information about the Fortran
mailing list