This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran,patch] PR 15809, part 1
- From: Erik Edelmann <eedelman at acclab dot helsinki dot fi>
- To: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Thu, 1 Sep 2005 15:56:05 +0300
- Subject: Re: [gfortran,patch] PR 15809, part 1
- References: <20050831191313.GA933@acclab.helsinki.fi>
eedelman@acclab.helsinki.fi wrote:
> :ADDPATCH <fortran>:
>
> The attached patch fixes one of the two bugs in 15809.
>
> The cause of the bug is that in trans-array.c/gfc_trans_deferred_array()
> we require that TREE_CODE (sym->backend_decl) == VAR_DECL.
> For dummy variables, however, TREE_CODE (sym->backend_decl) is
> PARM_DECL. We need to accept that as well.
>
> Bubblestrapped & reg. tested on 4.0 and mainline (Linux/x86).
> Please commit if OK.
Don't commit yet. While I still think the patch is correct in
the sense that it fixes the bug and doesn't break anything, I
also think that there might be a better way to fix the bug.
The reasons why I think this:
1) gfc_trans_deferred_array() doesn't do anything special for
dummy arguments.
2) gfc_trans_deferred_array() seems to not be called for any
other type of dummies than
CHARACTER(len=<expression_involving_other_dummy_var>).
The better solution I'm thinking of is to just avoid calling
gfc_trans_deferred_array() for (any kind of) dummy arguments.
Erik