2018-02-19 Paul Thomas <pault@gcc.gnu.org>
commitef718f2c199e9bf64602c621a432378986da0815
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Feb 2018 22:09:13 +0000 (19 22:09 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Feb 2018 22:09:13 +0000 (19 22:09 +0000)
tree6cc61d1ee188ac070aa47e36dba8c05370e5b2bc
parentddc5a1dfbd293763de09ec27e6e650d185bbabd4
2018-02-19  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/83344
PR fortran/83975
* resolve.c (resolve_assoc_var): Rearrange the logic for the
determination of the character length of associate names. If
the associate name is missing a length expression or the length
expression is not a constant and the target is not a variable,
make the associate name allocatable and deferred length.
* trans-decl.c (gfc_get_symbol_decl): Null the character length
backend_decl for deferred length associate names that are not
variables. Set 'length' to gfc_index_zero_node for character
associate names, whose character length is a PARM_DECL.

2018-02-19  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/83344
PR fortran/83975
* gfortran.dg/associate_22.f90: Enable commented out test.
* gfortran.dg/associate_36.f90: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257827 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/fortran/trans-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/associate_22.f90
gcc/testsuite/gfortran.dg/associate_36.f90 [new file with mode: 0644]