2018-05-19 Paul Thomas <pault@gcc.gnu.org>
commita3adbb9e66610933ff1b0444d1cbad0732b41eb0
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 May 2018 11:32:30 +0000 (19 11:32 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 May 2018 11:32:30 +0000 (19 11:32 +0000)
tree947d8e203de9af3eb28be7a1a21dc4e4afdc6201
parentee2e4f49712f0b522ecc25869331e30f69b48fe9
2018-05-19  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/82923
PR fortran/66694
PR fortran/82617
* trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
charlen backend_decl of the rhs expr to ss->info->string_length
so that the value in the current scope is used.

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

PR fortran/82923
* gfortran.dg/allocate_assumed_charlen_4.f90: New test. Note
that the patch fixes PR66694 & PR82617, although the testcases
are not explicitly included.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@260395 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/allocate_assumed_charlen_4.f90 [new file with mode: 0644]