[Patch, fortran] PR87151 - allocating array of character
Paul Richard Thomas
paul.richard.thomas@gmail.com
Sun Oct 7 18:01:00 GMT 2018
This turned out to be rather more than the allocation... The ChangeLog
and the patch tell the story well enough.
Bootstraps and regtests on FC28/x86_64 - OK for trunk and later for 8-branch?
Cheers
Paul
2018-10-07 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.
2018-10-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/87151
* gfortran.dg/deferred_type_component_3.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 9974 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20181007/a8eb4e52/attachment.bin>
More information about the Fortran
mailing list