2018-02-17 Paul Thomas <pault@gcc.gnu.org>
commitaa53a3f7fba14b04b0ec251a1fa62290d0b4f8ac
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Feb 2018 11:07:32 +0000 (17 11:07 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Feb 2018 11:07:32 +0000 (17 11:07 +0000)
tree0261cf814bb464b35228e498b8b896484764ed07
parentf333f9770f8e60bfed5fc830aeeae943d8fc93af
2018-02-17  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/84115
* resolve.c (resolve_assoc_var): If a non-constant target expr.
has no string length expression, make the associate variable
into a deferred length, allocatable symbol.
* trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
the symbol.
* trans-stmt.c (trans_associate_var): Null and free scalar
associate names that are allocatable. After assignment, remove
the allocatable attribute to prevent reallocation.

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

PR fortran/84115
* gfortran.dg/associate_35.f90: Remove error, add stop n's and
change to run.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257781 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/primary.c
gcc/fortran/resolve.c
gcc/fortran/trans-array.c
gcc/fortran/trans-expr.c
gcc/fortran/trans-stmt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/associate_35.f90