| 1 |
! { dg-do run } |
| 2 |
! { dg-options "-std=legacy" } |
| 3 |
! |
| 4 |
!pr19313 - inquire(..pad=..) |
| 5 |
implicit none |
| 6 |
! logical debug |
| 7 |
! data debug /.TRUE./ |
| 8 |
character*20 chr |
| 9 |
chr='' |
| 10 |
! not connected |
| 11 |
inquire(7,pad=chr) |
| 12 |
! if (debug) print*,chr |
| 13 |
if (chr.ne.'UNDEFINED') STOP 1 |
| 14 |
chr='' |
| 15 |
! not a formatted file |
| 16 |
open(7,FORM='UNFORMATTED',STATUS='SCRATCH') |
| 17 |
inquire(7,pad=chr) |
| 18 |
! if (debug) print*,chr |
| 19 |
if (chr.ne.'UNDEFINED') STOP 2 |
| 20 |
chr='' |
| 21 |
! yes |
| 22 |
open(8,STATUS='SCRATCH',PAD='YES') |
| 23 |
inquire(8,pad=chr) |
| 24 |
! if (debug) print*,chr |
| 25 |
if (chr.ne.'YES') STOP 3 |
| 26 |
chr='' |
| 27 |
! no |
| 28 |
open(9,STATUS='SCRATCH',PAD='NO') |
| 29 |
inquire(9,pad=chr) |
| 30 |
! if (debug) print*,chr |
| 31 |
if (chr.ne.'NO') STOP 4 |
| 32 |
chr='' |
| 33 |
end |