[Bug fortran/103115] [12/13/14/15 Regression] reallocation of character array fails when appending a constant size 4 array
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jul 19 15:40:54 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103115
--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:c93be1606ecf8e0f65b96b67aa023fb456ceb3a3
commit r15-2156-gc93be1606ecf8e0f65b96b67aa023fb456ceb3a3
Author: Harald Anlauf <anlauf@gmx.de>
Date: Thu Jul 18 21:15:48 2024 +0200
Fortran: character array constructor with >= 4 constant elements [PR103115]
gcc/fortran/ChangeLog:
PR fortran/103115
* trans-array.cc (gfc_trans_array_constructor_value): If the first
element of an array constructor is deferred-length character and
therefore does not have an element size known at compile time, do
not try to collect subsequent constant elements into a constructor
for optimization.
gcc/testsuite/ChangeLog:
PR fortran/103115
* gfortran.dg/string_array_constructor_4.f90: New test.
More information about the Gcc-bugs
mailing list