This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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, gfortran] PR 25217: INTENT(OUT) args. with default initializers


On Tuesday 18 July 2006 22:35, Erik Edelmann wrote:
> :ADDPATCH fortran:
>
> Here's a fix for PR 25217; INTENT(OUT) arguments of derived type with
> default initializers weren't (re)initialized upon procedure entry.
> This patch adds code to assign the initializer to the argument in
> trans-expr.c (gfc_conv_function_call).
>
> Bootstrapped and reg. tested on trunk, Linux/x86.  Ok?
> Ok for 4.1 when/if testing passes?

Would it not be better to set the sym->value for the derived type
dummy arg in resolve_fl_variable, and then expand that later on in
trans-expr?  That way you (should) see the initializer if you dump
the fortran parse tree (-fdump-parse-tree).

Gr.
Steven


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