Lahey/GNU Fortran

-stack size

Set size of the stack

Link only. Default: none

GFortran option: -Wl,--stack

Specify -stack size to set the amount of memory to reserve to be used as stack for this program. The default is 2097152 (2 MB) reserved, 4096 (4 KB) committed.

size is the maximum size of the stack in bytes.

If your program exceeds the maximum amount of stack at runtime, increase the stack size above the default. Note that some recursive procedures and programs with large arrays compiled with -nsav can use very large amounts of stack.