Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26758 Discussions

Seg. fault when calling a TBP from a coarray

FlyingHermes
New Contributor I
105 Views

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
    Steven_L_Intel1
    Employee
    105 Views

    We'll take a look - thanks.

    Steven_L_Intel1
    Employee
    105 Views

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

    Reply