diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/argument_checking_6.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/argument_checking_6.f90 | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/argument_checking_6.f90 b/gcc/testsuite/gfortran.dg/argument_checking_6.f90 new file mode 100644 index 000000000..e2d26923d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/argument_checking_6.f90 @@ -0,0 +1,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 |