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

parametrized derived type problem

Ulrich_M_
New Contributor I
263 Views

Hi,

The following program stops for me after having printed "x" and crashes on the parameterized derived type assignment in the critical section. It works as intended if the components are assigned separately (as in the commented out lines). Compiler bug? Thank you,

UM

0 Kudos
5 Replies
Steven_L_Intel1
Employee
263 Views

Sure looks like a compiler bug to me - thanks. Escalated as issue DPD200408252. 

0 Kudos
Ulrich_M_
New Contributor I
263 Views

I did some reading: the OpenMP 4.0 standard explicitly declares parametrized derived types as not supported, so I guess the behavior is technically undefined.

UM

0 Kudos
Steven_L_Intel1
Employee
263 Views

The developers say that this usage is simply invalid and will change the compiler to give an error in a future release.

0 Kudos
jimdempseyatthecove
Honored Contributor III
263 Views

Steve,

In this specific case, the paramerterized derived type is also POD. The compiler could have easily handled this. Note that the sample code also illustrates a POD copy operator for

      Siginvs0(j)=Siginv

Therefore I suggest that a compiler issue a warning about potential non-portable statements, but implement POD support for parameterized derived types. MHO

Jim Dempsey

0 Kudos
Steven_L_Intel1
Employee
263 Views

I imagine we'll support this eventually, but not for now.

0 Kudos
Reply