Fortran: Set the length of an allocatable character
commit6caec7d9ec37e60e718a12934c85bac9c12757ac
authorSteve Kargl <kargl@gcc.gnu.org>
Tue, 13 Feb 2024 04:41:02 +0000 (12 20:41 -0800)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Tue, 13 Feb 2024 04:49:49 +0000 (12 20:49 -0800)
treeab90fc7e5c28928e22c99fd728929bd10d03da2d
parentb753ef8f0c1d9cedd0ca688b68be10dc8f9c32bb
Fortran: Set the length of an allocatable character

PR fortran/113883

gcc/fortran/ChangeLog:

* trans-array.cc (gfc_trans_deferred_array): Set length to zero,
avoiding extraneous diagnostics.

gcc/testsuite/ChangeLog:

* gfortran.dg/allocatable_length.f90: New test.
gcc/fortran/trans-array.cc
gcc/testsuite/gfortran.dg/allocatable_length.f90 [new file with mode: 0644]