[Bug fortran/107441] optional arguments are identified as "present" when missing
anlauf at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Oct 27 19:49:38 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107441
--- Comment #5 from anlauf at gcc dot gnu.org ---
(In reply to anlauf from comment #4)
> Is there a public documentation what the ordering should be?
It is actually documented for gfortran:
https://gcc.gnu.org/onlinedocs/gfortran/Argument-passing-conventions.html
The arguments are passed in the following order
* Result variable, when the function result is passed by reference
* Character length of the function result, if it is a of type CHARACTER and no
C binding is used
* The arguments in the order in which they appear in the Fortran declaration
* The present status for optional arguments with value attribute, which are
internally passed by value
* The character length and/or coarray token and offset for the first argument
which is a CHARACTER or a nonallocatable coarray dummy argument, followed by
the hidden arguments of the next dummy argument of such a type
So it is create_function_arglist which is broken.
More information about the Gcc-bugs
mailing list