Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
11 Views

Is this access violation error expected?

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
Highlighted
11 Views

Looks like a bug. As a work

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
Highlighted
11 Views

Escalated as issue

Escalated as issue DPD200411065.

Retired 12/31/2016
0 Kudos