]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: fix initialization of allocatable non-deferred character [PR59252]
authorHarald Anlauf <anlauf@gmx.de>
Fri, 7 Feb 2025 20:21:10 +0000 (21:21 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Fri, 7 Feb 2025 20:42:21 +0000 (21:42 +0100)
commit818c36a85e3faec5442eb26799bfa3bba7764b36
treeb41edb5da8c30336d0ca8b000326db5ce5b672a3
parentc9b8a8fc55168ba9ec5432fc7b86621074e1b887
Fortran: fix initialization of allocatable non-deferred character [PR59252]

PR fortran/59252

gcc/fortran/ChangeLog:

* trans-expr.cc (gfc_trans_subcomponent_assign): Initialize
allocatable non-deferred character with NULL properly.

gcc/testsuite/ChangeLog:

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