[PATCH] PR fortran/103418 - random_number() does not accept pointer, intent(in) array argument

Mikael Morin morin-mikael@orange.fr
Tue Dec 7 20:17:51 GMT 2021


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?



More information about the Fortran mailing list