]> gcc.gnu.org Git - gcc.git/commit
Fortran: diagnose strings of non-constant length in DATA statements [PR68569]
authorHarald Anlauf <anlauf@gmx.de>
Wed, 26 Jul 2023 19:12:45 +0000 (21:12 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Wed, 26 Jul 2023 19:45:28 +0000 (21:45 +0200)
commit27ba73644f53c118e3f9b3fe9cd792210696ec55
treefaa8a4c67fe6322d489416ec67508605691d16ac
parent15a122db3b7155eb52c0202e9d2d24d463590d27
Fortran: diagnose strings of non-constant length in DATA statements [PR68569]

gcc/fortran/ChangeLog:

PR fortran/68569
* resolve.cc (check_data_variable): Do not accept strings with
deferred length or non-constant length in a DATA statement.
Reject also substrings of string variables of non-constant length.

gcc/testsuite/ChangeLog:

PR fortran/68569
* gfortran.dg/data_char_4.f90: Adjust expected diagnostic.
* gfortran.dg/data_char_5.f90: Likewise.
* gfortran.dg/data_char_6.f90: New test.
gcc/fortran/resolve.cc
gcc/testsuite/gfortran.dg/data_char_4.f90
gcc/testsuite/gfortran.dg/data_char_5.f90
gcc/testsuite/gfortran.dg/data_char_6.f90 [new file with mode: 0644]
This page took 0.067109 seconds and 6 git commands to generate.