Debian Codegraph @

gcc/testsuite/gfortran.dg/io_constraints_13.f90

raw
1 ! { dg-do compile }
2 !
3 ! Test our conformance to item 4.9 ("Kind type parameters of integer
4 ! specifiers") of the Fortran 2003 status document at
5 ! ftp://ftp.nag.co.uk/sc22wg5/N1551-N1600/N1579.pdf
6 !
7 ! The non-default integer variables are allowed since Fortran 2003.
8 ! The non-default logical variables are allowed since Fortran 2008.
9
10 integer(kind=8) :: i, j, k, n
11 logical(kind=8) :: l1, l2, l3
12
13 open(10, status="scratch", iostat=i)
14
15 backspace(10, iostat=i)
16 endfile(10, iostat=i)
17 rewind(10, iostat=i)
18
19 read(*, '(I2)', iostat=i) k
20 read(*, '(I2)', advance='no', size=j) k
21
22 inquire(iolength=i) "42"
23 inquire(10, iostat=i)
24 inquire(10, number=j)
25 inquire(10, recl=k)
26 inquire(10, nextrec=n)
27
28 inquire(10, exist=l1)
29 inquire(10, named=l3)
30 inquire(10, opened=l2)
31 inquire(10, pending=l2)
32
33 close(10, iostat=i)
34
35 end