1! { dg-do compile } 2! 3! PR fortran/92996 4! 5! Contributed by G. Steinmetz 6! 7 8module m 9 integer, parameter :: d(2) = [0,0] 10end module m 11 12subroutine one 13use m 14print size([1,2],dim=d(1)) ! { dg-error "'dim' argument of 'size' intrinsic at .1. is not a valid dimension index" } 15end 16 17subroutine two 18complex, parameter :: x = 1 19 20stop x ! { dg-error "STOP code at .1. must be either INTEGER or CHARACTER type" } 21end 22 23program p 24 integer, parameter :: a(2) = [1, 2] 25 stop a(1) ! OK 26 stop a ! { dg-error "STOP code at .1. must be scalar" } 27 stop a(1,1) ! { dg-error "Rank mismatch in array reference at .1. .2/1." } 28end 29