Size of deallocated pointer in Fortran

by Yi Zhang

Something I just found out. A deallocated pointer retains its size in terms of the return  of the SIZE function. Specifically, if the pointer is first allocated with size n and later deallocated, SIZE function still returns n. I’ve checked this on GNU and PGI Fortran and got same results, but not sure whether this is compiler dependent. Check standards later.