https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101699
Bug ID: 101699 Summary: [Coarrays] deferred-length character inside a derived type coarray cannot be accessed by coindexing Product: gcc Version: 11.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: harris at sourceryinstitute dot org Target Milestone: --- A deferred-length string inside a derived-type coarray cannot be accessed correctly by coindexing. This is true even if the coindex is the local image... The relevant fact seems to be whether or not coindexing is used. Example: the following program should print "Hello, World!" twice. With -fcoarray=single, it works correctly. When using -fcoarray=lib (OpenCoarrays 2.9.2), the first print statement works but the second one prints an empty string. program main type :: with_character character(len=:), allocatable :: chars end type type(with_character) :: mailbox[*] mailbox%chars = "Hello, World!" print *, mailbox%chars print *, mailbox[this_image()]%chars end program