I gave a subroutine that uses automatic arrays. In some (rare) occasions, there isn't enough memory and the call to the routine generates a "stack overflow" error. The automatic arrays are too large. Is there a way to trap the memoray allocation failure within the routine, so that I can set a error flag and do a graceful return? I being careful here to say "automatic arrays", not "allocatable arrays." I don't want to use allocatable arrays in this routine.