| 1 |
! { dg-do run } |
| 2 |
! PR48976 test case by [email protected] |
| 3 |
character(len=20) :: str |
| 4 |
str = "abcdefg" |
| 5 |
inquire(file="abcddummy", stream=str) |
| 6 |
!print *, "str=",str |
| 7 |
if (str /= "UNKNOWN") STOP 1 |
| 8 |
inquire(99, stream=str) |
| 9 |
!print *, "str=",str |
| 10 |
if (str /= "UNKNOWN") STOP 2 |
| 11 |
open(99,access="stream") |
| 12 |
inquire(99, stream=str) |
| 13 |
!print *, "str=",str |
| 14 |
if (str /= "YES") goto 10 |
| 15 |
close(99) |
| 16 |
open(99,access="direct", recl=16) |
| 17 |
inquire(99, stream=str) |
| 18 |
!print *, "str=",str |
| 19 |
if (str /= "NO") goto 10 |
| 20 |
close(99) |
| 21 |
open(99,access="sequential") |
| 22 |
inquire(99, stream=str) |
| 23 |
!print *, "str=",str |
| 24 |
if (str /= "NO") goto 10 |
| 25 |
close(99, status="delete") |
| 26 |
stop |
| 27 |
10 close(99, status="delete") |
| 28 |
STOP 3 |
| 29 |
end |