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]

[patch, fortran] PR 29393: Ranks of PARAMETER-lhs in initializations


This patch fixes PR 29393.  Problem: In expr.c
(simplify_parameter_variable), we replace the original expression p with
a simplified experssion derived from p->symtree->n.sym->value.  Now, if
p->symtree->n.sym->value has different rank than p, the rank will become
wrong.  This oneliner will restore the rank to the correct value.

Tested on trunk, Linux/x86.  I intend to commit it tomorrow as obvious to trunk
and, if it passes regressiontesting, 4.2 and 4.1, unless there are
objections.


        Erik

2006-10-23  Erik Edelmann  <eedelman@gcc.gnu.org>

        PR fortran/29393
        * expr.c (simplify_parameter_variable): Keep rank of original
        expression.


2006-10-23  Erik Edelmann  <eedelman@gcc.gnu.org>

        PR fortran/29393
        * gfortran.dg/initialize_2.f90: New.

Attachment: pr29393.diff
Description: Text document


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