-
- Downloads
fortran: simplify elemental arguments walking
This adds two functions working with the wrapper struct gfc_dummy_arg and makes usage of them to simplify a bit the walking of elemental procedure arguments for scalarization. As information about dummy arguments can be obtained from the actual argument through the just-introduced associated_dummy field, there is no need to carry around the procedure interface and walk dummy arguments manually together with actual arguments. gcc/fortran/ChangeLog: * interface.c (gfc_dummy_arg_get_typespec, gfc_dummy_arg_is_optional): New functions. * gfortran.h (gfc_dummy_arg_get_typespec, gfc_dummy_arg_is_optional): Declare them. * trans.h (gfc_ss_info::dummy_arg): Use the wrapper type as declaration type. * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference): use gfc_dummy_arg_get_typespec function to get the type. (gfc_walk_elemental_function_args): Remove proc_ifc argument. Get info about the dummy arg using the associated_dummy field. * trans-array.h (gfc_walk_elemental_function_args): Update declaration. * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call to gfc_walk_elemental_function_args. * trans-stmt.c (gfc_trans_call): Ditto. (get_proc_ifc_for_call): Remove.
Showing
- gcc/fortran/gfortran.h 4 additions, 0 deletionsgcc/fortran/gfortran.h
- gcc/fortran/interface.c 34 additions, 0 deletionsgcc/fortran/interface.c
- gcc/fortran/trans-array.c 6 additions, 13 deletionsgcc/fortran/trans-array.c
- gcc/fortran/trans-array.h 1 addition, 1 deletiongcc/fortran/trans-array.h
- gcc/fortran/trans-intrinsic.c 1 addition, 1 deletiongcc/fortran/trans-intrinsic.c
- gcc/fortran/trans-stmt.c 0 additions, 22 deletionsgcc/fortran/trans-stmt.c
- gcc/fortran/trans.h 2 additions, 2 deletionsgcc/fortran/trans.h
Loading
Please register or sign in to comment