[PATCH v3 5/5] fortran: Identify arguments by their names
Mikael Morin
mikael@gcc.gnu.org
Sun Nov 7 16:16:36 GMT 2021
This provides a new function to get the name of a dummy argument,
so that identifying an argument can be made using just its name
instead of a mix of name matching (for keyword actual arguments)
and argument counting (for other actual arguments).
gcc/fortran/ChangeLog:
* interface.c (gfc_dummy_arg_get_name): New function.
* gfortran.h (gfc_dummy_arg_get_name): Declare it.
* trans-array.c (arg_evaluated_for_scalarization): Pass a dummy
argument wrapper as argument instead of an actual argument
and an index number. Check it’s non-NULL. Use its name
to identify it.
(gfc_walk_elemental_function_args): Update call to
arg_evaluated for scalarization. Remove argument counting.
---
gcc/fortran/gfortran.h | 1 +
gcc/fortran/interface.c | 17 +++++++++++++++++
gcc/fortran/trans-array.c | 16 +++++-----------
3 files changed, 23 insertions(+), 11 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-fortran-Identify-arguments-by-their-names.patch
Type: text/x-patch
Size: 2735 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20211107/3f0660ca/attachment.bin>
More information about the Gcc-patches
mailing list