This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This problem arises because an actual argument that is a full array reference to an implicit result, within the procedure itself, results in the procedure declaration being passed rather than the "fake result declaration". The patch detects the condition in trans-array.c (gfc_conv_array_parameter) and treats the correct declaration appropriately for passing as an actual argument.
The testcase is based on that of the reporter, has been embellished by Tobias Burnus and added to by yours truly. It now checks that assumed size and assumed shape formal arguments work, with implicit and explicit procedure results. In addition, the passing of sections of the result are also checked.
PR fortran/31292 * trans-array.c (gfc_conv_array_parameter): Convert full array references to the result of the procedure enclusing the call.
PR fortran/31292 * gfortran.dg/actual_array_result_1.f90: New test.
Attachment:
pr31692_new.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |