gcc/testsuite/gfortran.dg/argument_checking_6.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! PR fortran/32669 |
| 3 | ! |
| 4 | ! Contributed by Janus Weil <[email protected]> |
| 5 | ! |
| 6 | program tfe |
| 7 | implicit none |
| 8 | |
| 9 | real,dimension(-1:1) :: w |
| 10 | real,dimension(1:4) :: x |
| 11 | real,dimension(0:3) :: y |
| 12 | real,dimension(-1:2) :: z |
| 13 | |
| 14 | call sub(x(:)) |
| 15 | call sub(y(:)) |
| 16 | call sub(z(:)) |
| 17 | call sub(w(:)) ! { dg-error "too few elements" } |
| 18 | |
| 19 | contains |
| 20 | subroutine sub(a) |
| 21 | implicit none |
| 22 | real,dimension(1:4) :: a |
| 23 | end subroutine sub |
| 24 | end program tfe |