[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
Sun Jul 21 19:53:42 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103115
--- Comment #18 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:ae6d5dc35735168c13f4599e7cf3f32fbb3c06c9
commit r13-8930-gae6d5dc35735168c13f4599e7cf3f32fbb3c06c9
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.
(cherry picked from commit c93be1606ecf8e0f65b96b67aa023fb456ceb3a3)
More information about the Gcc-bugs
mailing list