[Patch][Fortran] Fix result-variable handling of MODULE PROCEDURE (PR94348) (was: Bug 94348 - gfortran 8/9 reject module procedure definition in same module as function interface (edit))
Tobias Burnus
tobias@codesourcery.com
Fri Mar 27 16:27:58 GMT 2020
In the the PR, the question was raised whether the code
is valid or not. I believe it is, based on the general
wording but also on the following quote from F2019:
"If it is a function its result name is determined
by the FUNCTION statement in the interface body."
(Last sentence before the final "Note" in
"15.6.2.5 Separate module procedures".)
As testing shows – and matching the description in
the PR – the result-variable name is already handled
when used in submodules; hence, the use-assoc check.
OK for the trunk?
Tobias
PS: The issue has been reported against GCC 8/9;
any sentiment regarding backporting the fix
to 9 (or even both?) – or is trunk enough,
given that GCC 10 will be release relatively soonish?
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: modproc.diff
Type: text/x-patch
Size: 2089 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20200327/91184889/attachment.bin>
More information about the Fortran
mailing list