Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice

parametrized derived type problem

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
Highlighted

Sure looks like a compiler

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

Retired 12/31/2016
0 Kudos
Highlighted
Novice

I did some reading: the

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
Highlighted

The developers say that this

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

Retired 12/31/2016
0 Kudos
Highlighted

Steve,

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
Highlighted

I imagine we'll support this

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

Retired 12/31/2016
0 Kudos