aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr102180.f90
blob: cbf3e7299e77ffed60a584b99871d3105e1feb07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do compile }
! { dg-options "-fcoarray=lib" }
! PR fortran/102180 - Improve checking of assumed size array spec

subroutine s(x,y)
  real :: x(0:*) ! legal
  real :: y[0:*] ! legal
end

subroutine t(x,y)
  real :: x(:*) ! { dg-error "A lower bound must precede colon" }
  real :: y[:*] ! { dg-error "A lower bound must precede colon" }
end

subroutine u(x,y,z)
  real :: x(2,*)
  real :: y(2,2:*)
  real :: z(2,:*) ! { dg-error "A lower bound must precede colon" }
end