2018-09-17 Paul Thomas <pault@gcc.gnu.org>
commit1edfd7ddf58c3b8122b46d532b512d3d5d31ab63
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 Sep 2018 07:18:17 +0000 (17 07:18 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 Sep 2018 07:18:17 +0000 (17 07:18 +0000)
tree73ac3b0468f763ffe46fc2d04f7ca235be6b1f36
parente3fdb3c699ca39f0543a27c81786b7b41c1001e6
2018-09-17  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/85954
* resolve.c (resolve_assoc_var): If the target expression is a
deferred charlen dummy and the associate name shares the
charlen, generate a new one. Make sure that new charlens are in
the namespace list so that they get cleaned up.
* trans-array.c (gfc_is_reallocatable_lhs): Associate names are
not reallocatable.
* trans-decl.c (gfc_get_symbol_decl): Put deferred character
length dummy and result arrays on the deferred initialization
list so that the variable length arrays can be correctly dealt
with.
* trans-expr.c (gfc_conv_string_length): Return if 'expr' is
NULL rather than ICEing..

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

PR fortran/85954
* gfortran.dg/deferred_character_21.f90 : New test.

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