A related thread is Do we need REALLOCATE? and issue is Add deallocate/reallocate option to ALLOCATE · Issue #61 · j3-fortran/fortran_proposals · GitHub.