- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The code below gives the following error: "error #6593: The number of expressions in a structure constructor differs from the number of components of the derived type. [TYPERESTRIC_UNITVECT]", but according to me the code should be correct.
PROGRAM wrong_constructor IMPLICIT NONE TYPE VECTOR REAL(8),POINTER,DIMENSION(:)::rpt=>null(),rptp=>null(),rpts=>null() END TYPE VECTOR TYPE,ABSTRACT::typerestric INTEGER:: ir = -1 INTEGER numrestrics REAL(8)::penaltycoef_rel=1.d0 END TYPE typerestric TYPE,EXTENDS(typerestric)::typerestric_unitvect TYPE(VECTOR),POINTER:: u END TYPE typerestric_unitvect TYPE(VECTOR),TARGET::u TYPE(typerestric_unitvect) RS RS=typerestric_unitvect(ir=1,numrestrics=1,penaltycoef_rel=1.d0,u=u) END PROGRAM wrong_constructor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The compiler seems to get confused by the two uses of "u" in the constructor. If I rename the variable to "u2" it works. Please submit this in a bug report to Intel.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The compiler seems to get confused by the two uses of "u" in the constructor. If I rename the variable to "u2" it works. Please submit this in a bug report to Intel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much, Steve, I didn't notice this. Moreover, it happens only with extended types, if all the variables are defined in the type without extension, the bug dissapears too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve Lionel (Ret.) (Blackbelt) wrote:The compiler seems to get confused by the two uses of "u" in the constructor. If I rename the variable to "u2" it works. Please submit this in a bug report to Intel.
Done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your report. I have escalated this issue to our compiler engineering.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Devorah.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
this issue was fixed in PSXE 2020 Update 2, compilers 19.1.2


- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page