1! { dg-do compile } 2! PR fortran/32323 3! Array sections with vector subscripts are not allowed 4! with dummy arguments which have VOLATILE or INTENT OUT/INOUT 5! 6! Contributed by terry@chem.gu.se 7! 8module mod 9implicit none 10contains 11subroutine aa(v) 12integer,dimension(:),volatile::v 13write(*,*)size(v) 14v=0 15end subroutine aa 16subroutine bb(v) 17integer,dimension(:),intent(out)::v 18write(*,*)size(v) 19v=0 20end subroutine bb 21end module mod 22 23program ff 24use mod 25implicit none 26integer,dimension(10)::w 27w=1 28call aa(w(2:4)) 29call aa(w((/3,2,1/))) ! { dg-error "vector subscript" } 30call bb(w(2:4)) 31call bb(w((/3,2,1/))) ! { dg-error "vector subscript" } 32write(*,*)w 33end 34