This is the mail archive of the
mailing list for the GCC project.
Re: [patch, gfortran] PR 25217: INTENT(OUT) args. with default initializers
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Erik Edelmann <erik dot edelmann at iki dot fi>, gfortran <fortran at gcc dot gnu dot org>
- Date: Wed, 19 Jul 2006 00:19:47 +0200
- Subject: Re: [patch, gfortran] PR 25217: INTENT(OUT) args. with default initializers
- References: <20060718203533.GA12114@acclab.helsinki.fi>
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).