https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85144
Bug ID: 85144 Summary: Wrong assignment with allocatable charlen Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: tkoenig at gcc dot gnu.org Target Milestone: --- From c.l.f. The program ! Original test case by Manfred Tietze program show_problem implicit none ! derived type with an array of strings with variable length type var_text character(len=:), dimension(:), allocatable :: text end type var_text type(var_text) :: b integer :: i ! test with an array of variable length strings allocate(character(len=3) :: b%text(3)) b%text(1) = 'abc' b%text(2) = '123' print *,b%text(1) print *,"x",b%text,"x" yields, with current trunk 123 xx