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!
26755 Discussions

Wrong error for derived-type coarray with no component

FlyingHermes
New Contributor I
116 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
    116 Views

    We'll take a look - thanks.

    Steven_L_Intel1
    Employee
    116 Views

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

    Reply