| 1 |
! { dg-do compile } |
| 2 |
! Tests fix for PR20840 - would ICE with vector subscript in |
| 3 |
! internal unit. |
| 4 |
! |
| 5 |
! Contributed by Paul Thomas <[email protected]> |
| 6 |
! |
| 7 |
character(len=12), dimension(4) :: iu, buff |
| 8 |
character(len=48), dimension(2) :: iue |
| 9 |
equivalence (iu, iue) |
| 10 |
integer, dimension(4) :: v = (/2,1,4,3/) |
| 11 |
iu = (/"Vector ","subscripts","not ","allowed! "/) |
| 12 |
read (iu, '(a12/)') buff |
| 13 |
read (iue(1), '(4a12)') buff |
| 14 |
read (iu(4:1:-1), '(a12/)') buff |
| 15 |
read (iu(v), '(a12/)') buff ! { dg-error "with vector subscript" } |
| 16 |
read (iu((/2,4,3,1/)), '(a12/)') buff ! { dg-error "with vector subscript" } |
| 17 |
print *, buff |
| 18 |
end |
| 19 |
|