A number of DO loops can currently be terminated on the same (possibly executable) statement -- this causes all sorts of confusion, when programs are changed so that the loops do not logically end on a single statement any more.
DO 100 K=1,N DO 100 J=1,N DO 100 I=1,N ... 100 A(I,J,K)=A(I,J,K)/2.0
The simple solution is to use END DO instead.