gcc/testsuite/gfortran.dg/array_section_3.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! |
| 3 | ! PR fortran/54225 |
| 4 | ! |
| 5 | ! Contributed by robb wu |
| 6 | ! |
| 7 | program test |
| 8 | implicit none |
| 9 | real :: A(2,3) |
| 10 | |
| 11 | print *, A(1, *) ! { dg-error "Expected array subscript" } |
| 12 | end program |
| 13 | |
| 14 | subroutine test2 |
| 15 | integer, dimension(2) :: a |
| 16 | a(*) = 1 ! { dg-error "Expected array subscript" } |
| 17 | end |