3 ! Tests the fix PR29451, in which the negative size of the
4 ! automatic array 'jello' was not detected and the
5 ! runtime error: Attempt to allocate a negative amount of memory
8 ! Contributed by Philip Mason <pmason@ricardo.com>
16 subroutine jackal (b, c)
18 integer :: jello(b:c), cake(1:2, b:c), soda(b:c, 1:2)
19 if (lbound (jello, 1) <= ubound (jello, 1)) call abort ()
20 if (size (jello) /= 0) call abort ()
22 if (.not.any(lbound (cake) <= ubound (cake))) call abort ()
23 if (size (cake) /= 0) call abort ()
25 if ((lbound (soda, 1) > ubound (soda, 1)) .and. &
26 (lbound (soda, 2) > ubound (soda, 2))) call abort ()
27 if (size (soda) /= 0) call abort ()