2018-10-09 Paul Thomas <pault@gcc.gnu.org>
commit8c71d9ace911704339547af984daca7e1c8ff344
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Oct 2018 07:46:48 +0000 (9 07:46 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Oct 2018 07:46:48 +0000 (9 07:46 +0000)
tree428ac1315816d7c064ff22610d05ceebfdb49bf2
parent3a67778e4a34c5271286d2c51d32718d6b556150
2018-10-09  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/87151
* trans-array.c (gfc_get_array_span): Deal with deferred char
array components having a TYPE_MAX_VALUE of zero.
(gfc_array_init_size): Use the hidden string length component
to build the descriptor dtype.
(gfc_array_allocate): Remove the erroneous replacement of the
charlen backend decl with a temporary.
(gfc_conv_expr_descriptor): Use the ss_info string length in
the case of deferred character components.
(gfc_alloc_allocatable_for_assignment): Actually compare the
string lengths for deferred characters. Make sure that kind > 1
is handled correctly. Set the span field of the descriptor.
* trans-intrinsic.c (gfc_conv_intrinsic_len): Remove the stupid
comment.

PR fortran/80931
* trans-array.c (gfc_array_allocate): Set the span field for
variable length character arrays.

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

PR fortran/87151
* gfortran.dg/deferred_type_component_3.f90: New test.

PR fortran/80931
* gfortran.dg/deferred_character_28.f90: New test.
* gfortran.dg/deferred_character_29.f90: New test (note that
this test appears in PR83196 comment #4 by mistake).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264949 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/fortran/trans-intrinsic.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/deferred_character_28.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/deferred_character_29.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/deferred_type_component_3.f90 [new file with mode: 0644]