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: [gfortran,patch] PR 15809, part 1


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


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