re PR fortran/77325 (ICE in gimplify_var_or_parm_decl, at gimplify.c:1933)
authorPaul Thomas <pault@gcc.gnu.org>
Fri, 21 Sep 2018 17:33:29 +0000 (17:33 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Fri, 21 Sep 2018 17:33:29 +0000 (17:33 +0000)
commit5b4dd0158308d1a3effffd6316f1b39fdd1ad120
tree724835af8e907b547caed382d219d76051a50c9c
parentfd876246ee8a5aabb710673f7a8bc49b7c15fe84
re PR fortran/77325 (ICE in gimplify_var_or_parm_decl, at gimplify.c:1933)

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

PR fortran/77325
* trans-array.c (gfc_alloc_allocatable_for_assignment): If the
rhs has a charlen expression, convert that and use it.
* trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
assignment of deferred character array vars to a realocatable
lhs should not be added to the exterior block since vector
indices, for example, generate temporaries indexed within the
loop.

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

PR fortran/77325
* gfortran.dg/deferred_character_22.f90 : New test.

From-SVN: r264486
gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/deferred_character_22.f90 [new file with mode: 0644]