diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/inquire_6.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/inquire_6.f90 | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/inquire_6.f90 b/gcc/testsuite/gfortran.dg/inquire_6.f90 new file mode 100644 index 000000000..b657df831 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/inquire_6.f90 @@ -0,0 +1,33 @@ +! { dg-do run } +! { dg-options "-std=legacy" } +! +!pr19313 - inquire(..pad=..) + implicit none +! logical debug +! data debug /.TRUE./ + character*20 chr + chr='' +! not connected + inquire(7,pad=chr) +! if (debug) print*,chr + if (chr.ne.'UNDEFINED') call abort + chr='' +! not a formatted file + open(7,FORM='UNFORMATTED',STATUS='SCRATCH') + inquire(7,pad=chr) +! if (debug) print*,chr + if (chr.ne.'UNDEFINED') call abort + chr='' +! yes + open(8,STATUS='SCRATCH',PAD='YES') + inquire(8,pad=chr) +! if (debug) print*,chr + if (chr.ne.'YES') call abort + chr='' +! no + open(9,STATUS='SCRATCH',PAD='NO') + inquire(9,pad=chr) +! if (debug) print*,chr + if (chr.ne.'NO') call abort + chr='' + end |