annotate gcc/testsuite/gfortran.dg/io_constraints_11.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 ! { dg-options "-std=f95" }
kono
parents:
diff changeset
3 !
kono
parents:
diff changeset
4 ! Test our conformance to item 4.9 ("Kind type parameters of integer
kono
parents:
diff changeset
5 ! specifiers") of the Fortran 2003 status document at
kono
parents:
diff changeset
6 ! ftp://ftp.nag.co.uk/sc22wg5/N1551-N1600/N1579.pdf
kono
parents:
diff changeset
7 !
kono
parents:
diff changeset
8 ! The non-default integer variables are allowed since Fortran 2003.
kono
parents:
diff changeset
9 ! The non-default logical variables are allowed since Fortran 2008.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 integer(kind=8) :: i, j, k, n
kono
parents:
diff changeset
12 logical(kind=8) :: l1, l2, l3
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 open(10, status="scratch", iostat=i) ! { dg-error "requires default INTEGER" }
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 backspace(10, iostat=i) ! { dg-error "requires default INTEGER" }
kono
parents:
diff changeset
17 endfile(10, iostat=i) ! { dg-error "requires default INTEGER" }
kono
parents:
diff changeset
18 rewind(10, iostat=i) ! { dg-error "requires default INTEGER" }
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 read(*, '(I2)', iostat=i) k ! { dg-error "requires default INTEGER" }
kono
parents:
diff changeset
21 read(*, '(I2)', advance='no', size=j) k ! { dg-error "requires default INTEGER" }
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 inquire(iolength=i) "42" ! { dg-error "requires default INTEGER" }
kono
parents:
diff changeset
24 inquire(10, iostat=i) ! { dg-error "requires default INTEGER" }
kono
parents:
diff changeset
25 inquire(10, number=j) ! { dg-error "requires default INTEGER" }
kono
parents:
diff changeset
26 inquire(10, recl=k) ! { dg-error "requires default INTEGER" }
kono
parents:
diff changeset
27 inquire(10, nextrec=n) ! { dg-error "requires default INTEGER" }
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 inquire(10, exist=l1) ! { dg-error "Non-default LOGICAL kind" }
kono
parents:
diff changeset
30 inquire(10, named=l3) ! { dg-error "Non-default LOGICAL kind" }
kono
parents:
diff changeset
31 inquire(10, opened=l2) ! { dg-error "Non-default LOGICAL kind" }
kono
parents:
diff changeset
32 inquire(10, pending=l2) ! { dg-error "Non-default LOGICAL kind" }
kono
parents:
diff changeset
33
kono
parents:
diff changeset
34 close(10, iostat=i) ! { dg-error "requires default INTEGER" }
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 end