-
- Downloads
Fortran: ordering of hidden procedure arguments [PR107441]
The gfortran ABI specifies the order of given and hidden procedure arguments, where the hidden presence status flags of optional+value scalar arguments shall come before character length, coarray token and offset. Respect that. gcc/fortran/ChangeLog: PR fortran/107441 * trans-decl.cc (create_function_arglist): Adjust the ordering of automatically generated hidden procedure arguments to match the documented ABI for gfortran. * trans-types.cc (gfc_get_function_type): Separate hidden parameters so that the presence flag for optional+value arguments come before string length, coarray token and offset, as required. gcc/testsuite/ChangeLog: PR fortran/107441 * gfortran.dg/coarray/pr107441-caf.f90: New test. * gfortran.dg/optional_absent_6.f90: New test. * gfortran.dg/optional_absent_7.f90: New test.
Showing
- gcc/fortran/trans-decl.cc 19 additions, 4 deletionsgcc/fortran/trans-decl.cc
- gcc/fortran/trans-types.cc 8 additions, 3 deletionsgcc/fortran/trans-types.cc
- gcc/testsuite/gfortran.dg/coarray/pr107441-caf.f90 27 additions, 0 deletionsgcc/testsuite/gfortran.dg/coarray/pr107441-caf.f90
- gcc/testsuite/gfortran.dg/optional_absent_6.f90 60 additions, 0 deletionsgcc/testsuite/gfortran.dg/optional_absent_6.f90
- gcc/testsuite/gfortran.dg/optional_absent_7.f90 31 additions, 0 deletionsgcc/testsuite/gfortran.dg/optional_absent_7.f90
Loading
Please register or sign in to comment