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_
Novo colaborador I
1.610 Visualizações

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 Respostas
Steven_L_Intel1
Funcionário
1.610 Visualizações

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

Ulrich_M_
Novo colaborador I
1.610 Visualizações

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

Steven_L_Intel1
Funcionário
1.610 Visualizações

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

jimdempseyatthecove
Colaborador honorário III
1.610 Visualizações

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

Steven_L_Intel1
Funcionário
1.610 Visualizações

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

Responder