ALLOCATABLE arrays use heap storage
-
Declared without defined bounds
-
ALLOCATE & DEALLOCATE statements create and free storage
|
Local arrays use stack storage
-
Bounds may be non-constant, evaluated at procedure entry
-
E.g., local arrays the same size as a dummy parameter
|
Assumed-shape arrays can pass array sizes
-
Dummy parameters without declared bounds
-
Compiler passes bounds in a data descriptor
-
Bounds can be queried with intrinsics
|