https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107576

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #6 from anlauf at gcc dot gnu.org ---
(In reply to G. Steinmetz from comment #5)
> I had in mind Fortran 2018, 15.4.2.2 Explicit interface,
> and therefore had added the examples z1c.f90 and z2c.f90.

Can you point to the relevant clause?  I just don't see it...
(Although I agree one should need an explicit interface here.)

15.4.2.2(3) talks about dummy arguments, not about procedure references.
Am I missing something?

And call s(z) should be valid, although z has the POINTER attribute,
as long as z is associated.

> latest ifort/ifx :
> error #8615: Intrinsic NULL() is passed as actual argument. An explicit
> interface specifying that the corresponding dummy is pointer, allocatable or
> optional is required.
>    call s(null(z))

Yeah, that makes sense.

> Would be interesting what e.g. NAG and Cray say about it.

NAG Fortran Compiler Release 7.1(Hanzomon) Build 7101
Error: pr107576-z1.f90, line 4: Actual argument 1 to S is a disassociated
pointer

On the other hand,

Cray Fortran : Version 14.0.0  Mon Nov 14, 2022  18:53:42

is happily compiling the code, but I don't know what it does...

Reply via email to