]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: character array constructor with >= 4 constant elements [PR103115]
authorHarald Anlauf <anlauf@gmx.de>
Thu, 18 Jul 2024 19:15:48 +0000 (21:15 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Fri, 19 Jul 2024 15:40:27 +0000 (17:40 +0200)
commitc93be1606ecf8e0f65b96b67aa023fb456ceb3a3
tree23c89bde7507677e7668fa36fd0bd57b7bfe6d7d
parentb2f47a5c1d5204131660ea0372a08e692df8844e
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.
gcc/fortran/trans-array.cc
gcc/testsuite/gfortran.dg/string_array_constructor_4.f90 [new file with mode: 0644]