Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Is this access violation error expected?

OP1
New Contributor III
507 Views

The code below triggers an access violation error. Obviously, this is triggered by the empty type T. I would like to know if this is a compiler error though. Sometimes empty derived types are left in a code as placeholders for future development.

PROGRAM MAIN
IMPLICIT NONE
TYPE T
END TYPE T
TYPE(T),ALLOCATABLE :: A(:),B(:)
ALLOCATE(A(1),B(1))
B = A
END PROGRAM MAIN

 

0 Kudos
2 Replies
jimdempseyatthecove
Honored Contributor III
507 Views

Looks like a bug. As a work around, you can add a private variable to type T (with a name like "RemoveThisWhenYouAddVariablesToT")

Jim Dempsey

0 Kudos
Steven_L_Intel1
Employee
507 Views

Escalated as issue DPD200411065.

0 Kudos
Reply