diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/array_section_3.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/array_section_3.f90 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/array_section_3.f90 b/gcc/testsuite/gfortran.dg/array_section_3.f90 new file mode 100644 index 000000000..d3093d14d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/array_section_3.f90 @@ -0,0 +1,17 @@ +! { dg-do compile } +! +! PR fortran/54225 +! +! Contributed by robb wu +! +program test + implicit none + real :: A(2,3) + + print *, A(1, *) ! { dg-error "Expected array subscript" } +end program + +subroutine test2 +integer, dimension(2) :: a +a(*) = 1 ! { dg-error "Expected array subscript" } +end |