https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90305
Bug ID: 90305 Summary: ASSOCIATE with a substring of a deferred-length character selector yields garbage Product: gcc Version: 8.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: damian at sourceryinstitute dot org Target Milestone: --- An ASSOCIATE construct with a substring of a deferred-length character selector yields garbage with gfortran 8.3.0: $ cat associate.f90 character(len=:), allocatable :: string string = "f" associate( substring => string(:) ) print*,substring end associate end $ gfortran associate.f90 $ ./a.out P $ gfortran --version GNU Fortran (GCC) 8.3.0