[Bug fortran/95038] Not treating function result name as a variable.

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 29 11:49:33 GMT 2021


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

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

--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Bill Long from comment #4)
> Original submitter is looking for a fix version for this issue. Any
> predictions?

I think the problem is to understand the Fortran standard legalize.

In F2018, I see:
'An IMPORT, NONE statement in a scoping unit specifies that no entities in the
host scoping unit are accessible by host association in that scoping unit. This
is the default for an interface body for an external or dummy procedure'

This sounds as if test.f90 (rejected) and test1.f90 (accepted) should both be
rejected as there is not IMPORT.

While both variants of test2.f90, which use IMPORT, should be accepted (which
gfortran does).

 * * *

If I read the bug correctly, it is about accepting 'test.f90' (→ rejects valid)

But if I read the F2018 standard correctly, it sounds as if 'test1.f90' should
be rejected (→ accepts invalid).

Bill, can you help with the spec reading?


More information about the Gcc-bugs mailing list