1 ! Program to test the stack variable size limit.
7 ! Local variables larger than 32768 in byte size shall be placed in static
8 ! storage area, while others be put on stack by default.
10 real a
, b(32768/4), c(32768/4+1)
11 integer m
, n(1024,4), k(1024,1024)
18 if ((a
.ne
. 10.0).or
.(b(1) .ne
. 20.0).or
.(c(1) .ne
. 30.0)) STOP 1
19 if ((m
.ne
. 10).or
.(n(256,4) .ne
. 20).or
.(k(1,1024) .ne
. 30)) STOP 2
22 ! Local variables defined in recursive subroutine are always put on stack.
23 recursive subroutine sub2 (n
)
26 if (n
.ge
. 1) call sub2 (n
-1)
27 if (a(1) .ne
. 42) STOP 3