Hello,
To finally answer a thread started long ago, J3 passed an interp at its
last meeting saying it is legal to deallocate array pointers that were
pointed to array sections:
Specifically, is the following allowed:
REAL, DIMENSION(:), POINTER :: a, b
ALLOCATE(a(1:10))
b=>a(1:10)
DEALLOCATE(b)
J3's ANSWER:
Yes, this is allowed, since "whole" means that b is
ASSOCIATED with all elements of an array that was ALLOCATEd.
In the given example, ASSOCIATED(a,b) is .TRUE., therefore either
a or b can be used to DEALLOCATE the memory.
Aleksandar
|