On 07/12/2021 21:46, Harald Anlauf wrote:
Hi Mikael,
Am 07.12.21 um 21:17 schrieb Mikael Morin:
Hello,
On 05/12/2021 22:55, Harald Anlauf via Fortran wrote:
Dear all,
the check of dummy arguments with pointer attribute and INTENT(IN)
was broken in the case the argument was passed to an intrinsic.
We therefore rejected valid code as e.g. given in the PR.
The patch relaxes the excessive check. This requires the adjustment
of one of the tests for MOVE_ALLOC.
The existing code looks dubious to me (or at least difficult to
understand), and your patch doesn’t make that any better.
I would rather try to remove the whole block, and fix the fallout on
move_alloc by adding calls to gfc_check_vardef_context in
gfc_check_move_alloc.
Can you try that instead?
I hadn't thought that far but will think about a possibly better
solution.
Hello,
I thought about it some more over night, and it is probably a poor
suggestion to restrict the check to move_alloc only. The existing code
was added for move_alloc, but it has a broader scope. Still,
gfc_check_vardef_context has the correct checks and is the one to be used.