:ADDPATCH fortran:
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.
Bootstrapped and regtested on x86_ia64/FC5 - OK for trunk?
Paul
2007-05-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31292
* trans-array.c (gfc_conv_array_parameter): Convert full array
references to the result of the procedure enclusing the call.
2007-05-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31292
* gfortran.dg/actual_array_result_1.f90: New test.