[PATCH] Fix PR fortran/21977, nested function returning array
Andrew Pinski
pinskia@physics.uc.edu
Mon Jan 2 18:20:00 GMT 2006
The problem here is that we use the inner's fake result decl for the
outer function if
the inner function returns array.
This fixes the problem by NULLing out current_fake_result_decl after
converting
the function to GCC's trees.
OK? Built and tested on both powerpc-darwin and x86_64-linux-gnu with no
regressions.
Thanks,
Andrew Pinski
ChangeLog:
* trans-decl.c (gfc_generate_function_code): Null out
current_fake_result_decl
at the end of the function.
* gfortran.fortran-torture/compile/nested_2.f90: New test.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fixreturn.diff.txt
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060102/d1729d69/attachment.txt>
More information about the Fortran
mailing list