]> git.ipfire.org Git - thirdparty/gcc.git/commit
This patch fixes PRs 96100 and 96101.
authorPaul Thomas <pault@gcc.gnu.org>
Thu, 20 Aug 2020 17:17:59 +0000 (18:17 +0100)
committerPaul Thomas <pault@gcc.gnu.org>
Mon, 28 Dec 2020 14:56:37 +0000 (14:56 +0000)
commit47c1d976146913fad43688d45727d0038de174c7
tree5553c81d90edb27ccbfbf57867367090f0a5c272
parentc2840cf16aaa665aaac4f51345104c5766fb2406
This patch fixes PRs 96100 and 96101.

2020-08-20  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/96100
PR fortran/96101
* trans-array.c (get_array_charlen): Tidy up the evaluation of
the string length for array constructors. Avoid trailing array
references. Ensure string lengths of deferred length components
are set. For parentheses operator apply string  length to both
the primary expression and the enclosed expression.

gcc/testsuite/
PR fortran/96100
PR fortran/96101
* gfortran.dg/char_length_23.f90: New test.

(cherry picked from commit 300ef2fcc10e98359d14654be23bbb84a5d141e1)
gcc/fortran/trans-array.c
gcc/testsuite/gfortran.dg/char_length_23.f90 [new file with mode: 0644]