]> git.ipfire.org Git - thirdparty/gcc.git/commit
2018-09-30 Paul Thomas <pault@gcc.gnu.org>
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 30 Sep 2018 12:22:07 +0000 (12:22 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 30 Sep 2018 12:22:07 +0000 (12:22 +0000)
commit26a5bf7f44fcedb801a1c2022b9ce539801d0f52
tree52932d1b845b28c268d7a49e53166ffcfb5b5e55
parent87aaa65d50ec7d6c7e82f7937d716ddded68f942
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.

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