Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28441 Discussions

Wrong error for derived-type coarray with no component

FlyingHermes
New Contributor I
306 Views

Hi,

I'm using ifort version 17.0.0.

The following code gives a forrtl: severe (71): integer divide by zero error if the object has no component.

Just uncomment the component definition in the EmptyType specification and the error magically goes away.

! ifort -coarray -coarray-num-images=1 main.f90; ./a.out
Module EmptyType_Module
  Type      :: EmptyType
!    integer  :: idum
  End Type
End Module
Program Main
  use EmptyType_Module ,only:  EmptyType
  type(EmptyType)  ,allocatable  ::      Object[:]
  allocate( Object
  • ) End Program
  •  

    0 Kudos
    2 Replies
    Steven_L_Intel1
    Employee
    306 Views

    We'll take a look - thanks.

    0 Kudos
    Steven_L_Intel1
    Employee
    306 Views

    Escalated as issue DPD200416771. This thread will be updated with any progress. Thanks for the nice test case.

    0 Kudos
    Reply