fix pr/45972
[official-gcc.git] / gcc / testsuite / gfortran.dg / assumed_size_refs_4.f90
blob830ff0849bcc9699b4dd0bfdf2d964c635a0af68
1 ! { dg-do compile }
3 ! PR fortran/34759
4 ! gfortran was before rejecting passing an assumed-size array
5 ! where the last dimension was specified.
7 ! Test case provided by Dick Hendickson.
9 subroutine j_assumed_size(A,N)
10 dimension A(10,11,12,*), k(3), l(3), m(4)
11 m = shape(A(:,:,:,:N)) ! OK
12 l = shape(A(:,:,:,3)) ! OK
13 m = shape(A(:,:,:,:)) ! { dg-error "upper bound of assumed size array" }
14 m = shape(A) ! { dg-error "must not be an assumed size array" }
15 end