comparison gcc/testsuite/gfortran.dg/inquire_size.f90 @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
11 ! Gfortran implicitly flushes the buffer when doing a file size 11 ! Gfortran implicitly flushes the buffer when doing a file size
12 ! inquire on an open file. 12 ! inquire on an open file.
13 ! flush(25) 13 ! flush(25)
14 14
15 inquire(unit=25, named=is_named, name=aname, size=i) 15 inquire(unit=25, named=is_named, name=aname, size=i)
16 if (.not.is_named) call abort 16 if (.not.is_named) STOP 1
17 if (aname /= "testfile_inquire_size") call abort 17 if (aname /= "testfile_inquire_size") STOP 2
18 if (i /= 3000) call abort 18 if (i /= 3000) STOP 3
19 19
20 inquire(file="testfile_inquire_size", size=i) 20 inquire(file="testfile_inquire_size", size=i)
21 if (.not.is_named) call abort 21 if (.not.is_named) STOP 4
22 if (aname /= "testfile_inquire_size") call abort 22 if (aname /= "testfile_inquire_size") STOP 5
23 if (i /= 3000) call abort 23 if (i /= 3000) STOP 6
24 24
25 close(25, status="delete") 25 close(25, status="delete")
26 inquire(file="testfile_inquire_size", size=i) 26 inquire(file="testfile_inquire_size", size=i)
27 if (i /= -1) call abort 27 if (i /= -1) STOP 7
28 end 28 end
29 29
30 30