[PATCH] Fix PR fortran/21977, nested function returning array
Andrew Pinski
pinskia@physics.uc.edu
Mon Jan 2 21:05:00 GMT 2006
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
More information about the Gcc-patches
mailing list