summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/array_section_3.f90
blob: d3093d14d5030494bc017d43a8589d7397f7cc21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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