https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107635

            Bug ID: 107635
           Summary: [Coarray] Allocatable components of types defined in
                    module's interface are not handled correctly when used
                    in coarrays.
           Product: gcc
           Version: 11.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vehre at gcc dot gnu.org
  Target Milestone: ---

Created attachment 53881
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53881&action=edit
Example demonstrating the issue.

When defining a type with an allocatable component in a module's interface (it
doesn't really matter where the implementation is given either in the same
module or a submodule) and using gfortran with -fcoarray=lib (for example in
combination with opencoarrays), then the alloc.comp. is not treated correctly
when used in a coarray. The issue is, that during internal type generation the
coarray attr is not set for the type and therefore no member for the
(sub-)caf_token is assigned. This leads to segfaults in the calling code. See
attached example and issue
https://github.com/sourceryinstitute/OpenCoarrays/issues/739 from opencoarrays.

Reply via email to