C======================================================================= C FILE: TEST31.FOR C DATE: 21 July 2003 C C TEST: subscript out of range for a correctly reshapped array. C C Author/contact: Arnaud Desitter C======================================================================= subroutine sub1(a,n) integer n real a(n,*) c a(11,1) maps to linear subscript (11) which is within bounds. c but 11 exceeds the leading dimension n=10 a(11,1) = 0. return end program test31 real a(10,2) call sub1(a,10) write(*,*) 'Test 31 Failed.' end