[Bug fortran/70752] Incorrect LEN for ALLOCATABLE CHARACTER
pault at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Sep 30 12:51:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70752
--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Sun Sep 30 12:22:07 2018
New Revision: 264724
URL: https://gcc.gnu.org/viewcvs?rev=264724&root=gcc&view=rev
Log:
2018-09-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/70752
PR fortran/72709
* trans-array.c (gfc_conv_scalarized_array_ref): If this is a
deferred type and the info->descriptor is present, use the
info->descriptor
(gfc_conv_array_ref): Is the se expr is a descriptor type, pass
it as 'decl' rather than the symbol backend_decl.
(gfc_array_allocate): If the se string_length is a component
reference, fix it and use it for the expression string length
if the latter is not a variable type. If it is a variable do
an assignment. Make use of component ref string lengths to set
the descriptor 'span'.
(gfc_conv_expr_descriptor): For pointer assignment, do not set
the span field if gfc_get_array_span returns zero.
* trans.c (get_array_span): If the upper bound a character type
is zero, use the descriptor span if available.
2018-09-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/70752
PR fortran/72709
* gfortran.dg/deferred_character_25.f90 : New test.
* gfortran.dg/deferred_character_26.f90 : New test.
* gfortran.dg/deferred_character_27.f90 : New test to verify
that PR82617 remains fixed.
Added:
trunk/gcc/testsuite/gfortran.dg/deferred_character_25.f90
trunk/gcc/testsuite/gfortran.dg/deferred_character_26.f90
trunk/gcc/testsuite/gfortran.dg/deferred_character_27.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list