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

Is this access violation error expected?

OP1
New Contributor II
280 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
280 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
280 Views

Escalated as issue DPD200411065.

0 Kudos
Reply