[Patch, fortran] PR31692 - Wrong code when passing function name as result to procedures
Paul Richard Thomas
paul.richard.thomas@gmail.com
Sat May 5 08:32:00 GMT 2007
On checking this patch, once it was posted, I noticed that there was a
redundant line, which was a remnant of an early version. Exploring
why the patch still worked led me to throwing half of it away:)
Consider this version of the fix to be withdrawn - I'll be back with a
replacement later today.
Paul
On 5/4/07, Paul Richard Thomas <paul.richard.thomas@gmail.com> wrote:
> :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.
>
>
--
"Success is the ability to go from one failure to another with no loss
of enthusiasm." - Winston Churchill
More information about the Fortran
mailing list