This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: [PATCH] Fix PR fortran/21977, nested function returning array



On Jan 2, 2006, at 3:58 PM, Tobias Schlüter wrote:


Andrew Pinski wrote:
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.

Won't this break if the containing function also needs a fake_result_decl,
i.e. e.g. in the original testcase?

No because the fake result decl for the outer function has not been
created as we have not converted the gfortran parse trees to GCC's trees yet
for the outer function.


The order of generating goes:
COMMON blocks
contained functions
local variables
generate GCC's trees for that function
some post processing

Thanks,
Andrew Pinski



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]