2005-12-23 Paolo Bonzini <bonzini@gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / inquire_6.f90
blob7575b6e67b3039ba7d8cef2ce6d63c44b925d552
1 ! { dg-do run }
2 !pr19313 - inquire(..pad=..)
3 implicit none
4 ! logical debug
5 ! data debug /.TRUE./
6 character*20 chr
7 chr=''
8 ! not connected
9 inquire(7,pad=chr)
10 ! if (debug) print*,chr
11 if (chr.ne.'UNDEFINED') call abort
12 chr=''
13 ! not a formatted file
14 open(7,FORM='UNFORMATTED',STATUS='SCRATCH')
15 inquire(7,pad=chr)
16 ! if (debug) print*,chr
17 if (chr.ne.'UNDEFINED') call abort
18 chr=''
19 ! yes
20 open(8,STATUS='SCRATCH',PAD='YES')
21 inquire(8,pad=chr)
22 ! if (debug) print*,chr
23 if (chr.ne.'YES') call abort
24 chr=''
25 ! no
26 open(9,STATUS='SCRATCH',PAD='NO')
27 inquire(9,pad=chr)
28 ! if (debug) print*,chr
29 if (chr.ne.'NO') call abort
30 chr=''
31 end