Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
8 Views

Seg. fault when calling a TBP from a coarray

Hi,

I get a segmentation fault when calling a type bound procedure from a coarray object.

In the following code, if the line 41 is commented, the seg. fault disappears.

Thanks.

 

 

! ifort -coarray main.f90; ./a.out

Module Block_Container_Class
  implicit none
  Type :: Block_Container_Type
    integer :: idum
  contains
    procedure ,public :: TBProcedure
  End Type
  contains
  Subroutine TBProcedure( This )
    class(Block_Container_Type)                           ,intent(inout)  ::      This
    write(*,*) "      [TBProcedure]: Inside"
  End Subroutine
  Subroutine NormalProcedure( This )
    type(Block_Container_Type)                           ,intent(inout)  ::      This
    write(*,*) "      [NormalProcedure]: Inside"
  End Subroutine
End Module

Module Mesh_Class
  use Block_Container_Class
  implicit none
  private
  public        ::      Mesh_Type
  Type  ::      Mesh_Type
    type(Block_Container_Type),allocatable ::      Blocks[:]
  contains
    procedure   ,public         ::      Construct
    procedure   ,private        ::      MeshTBProcedure
  End Type
  contains
  Subroutine Construct( This )
    class(Mesh_Type)                                      ,intent(inout)  ::      This
    call This%MeshTBProcedure()
  End Subroutine
  Subroutine MeshTBProcedure( This )
    class(Mesh_Type)                                      ,intent(inout)  ::      This
    allocate( This%Blocks
  • ) call NormalProcedure( This%Blocks ) call This%Blocks%TBProcedure() End Subroutine End Module Program Main use Mesh_Class ,only: Mesh_Type type(Mesh_Type) :: Mesh call Mesh%Construct() End Program
  •  

    0 Kudos
    2 Replies
    Highlighted
    8 Views

    We'll take a look - thanks.

    0 Kudos
    Highlighted
    8 Views

    This problem is our issue DPD200416083. Thanks for reporting it.

    0 Kudos