summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/argument_checking_6.f90
blob: e2d26923d77af97bf9a982c99488f2a63f386ae3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
! { dg-do compile }
! PR fortran/32669
!
! Contributed by Janus Weil <jaydub66@gmail.com>
!
program tfe
implicit none

real,dimension(-1:1) ::  w
real,dimension(1:4) ::  x
real,dimension(0:3) ::  y
real,dimension(-1:2) ::  z

call sub(x(:))
call sub(y(:))
call sub(z(:))
call sub(w(:)) ! { dg-warning "too few elements" }

contains
  subroutine sub(a)
    implicit none
    real,dimension(1:4) :: a
  end subroutine sub
end program tfe