Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Comunicados
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Segmentation fault when coarray attribute omitted for the dummy argument

FlyingHermes
Novo colaborador I
935 Visualizações

Hi,

The following code gives a segmentation fault.

This error is triggered when I call a procedure (ProceVersion2) passing a coarray actual argument but the associated dummy argument has NOT the coarray attribute.

If the same procedure is written with the coarray attribute for the dummy argument (ProceVersion1), then there is no error.

Surprisingly, if both procedures are called, there is also no error.

Also, if the allocatable attribute is removed, there is no error

Thanks for looking at this issue.

Program Main
  integer ,allocatable ,codimension[:]  ::    coVar
!   integer  ,codimension
  •   ::    coVar allocate( coVar
  • ) ! call ProceVersion1( coVar ) call ProceVersion2( coVar ) contains Subroutine ProceVersion1( Variable ) class(*) ,intent(in) :: Variable
  • write(6,"(4x,'[ProceVersion1]: Entering')") select type (Variable) type is (integer); write(6,"(4x,'[ProceVersion1]: integer')") class default; write(6,"(4x,'[ProceVersion1]: other')") end select End Subroutine Subroutine ProceVersion2( Variable ) class(*) ,intent(in) :: Variable write(6,"(4x,'[ProceVersion2]: Entering')") select type (Variable) type is (integer); write(6,"(4x,'[ProceVersion2]: integer')") class default; write(6,"(4x,'[ProceVersion2]: other')") end select End Subroutine End Program ! export FOR_COARRAY_NUM_IMAGES=1; ifort -coarray -coarray-num-images=1 -O0 -pg -warn all -traceback main.f90; ./a.out
  •  

    0 Kudos
    2 Respostas
    Steven_L_Intel1
    Funcionário
    935 Visualizações

    We'll take a look - thanks.

    Kevin_D_Intel
    Funcionário
    935 Visualizações

    I reproduced all the various results you noted using our latest 17.0 Update 1 release and escalated this to Development. Thank you for the nice test case.

    (Internal tracking id: DPD200416816)

    Responder