]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: different character lengths in array constructor [PR93289]
authorHarald Anlauf <anlauf@gmx.de>
Sat, 1 Feb 2025 18:14:21 +0000 (19:14 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Mon, 3 Feb 2025 21:36:20 +0000 (22:36 +0100)
commitf3a41e6cb5d70f0c94cc8273a118b8542fb5c2fa
tree20a994c4b35d1d6eef69d964f0141d8fb230297c
parent214224c4973bfb76f73a7efff29c5823eef31194
Fortran: different character lengths in array constructor [PR93289]

PR fortran/93289

gcc/fortran/ChangeLog:

* decl.cc (gfc_set_constant_character_len): Downgrade different
string lengths in character array constructor to legacy extension.

gcc/testsuite/ChangeLog:

* gfortran.dg/unlimited_polymorphic_1.f03: Pad element in character
array constructor to correct length.
* gfortran.dg/char_array_constructor_5.f90: New test.
gcc/fortran/decl.cc
gcc/testsuite/gfortran.dg/char_array_constructor_5.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/unlimited_polymorphic_1.f03