2 ! { dg-options "-std=f95" }
3 ! Part I of the test of the IO constraints patch, which fixes PRs:
4 ! PRs 25053, 25063, 25064, 25066, 25067, 25068, 25069, 25307 and 20862.
6 ! Contributed by Paul Thomas <pault@gcc.gnu.org>
10 2000 format (1h
, 2i6
) ! { dg-error "Format statement in module" }
24 100 format (1h
, "i=", i6
) ! { dg-warning "The H format specifier at ... is a Fortran 95 deleted feature" }
32 character(80) :: buffer(3)
34 ! Appending to a USE associated namelist is an extension.
36 NAMELIST /NL
/ a
,b
! { dg-warning "already is USE associated" }
41 write(c
, *) a
, b
! { dg-error "array" }
42 !Was correctly picked up before patch.
43 write(buffer((/3,1,2/)), *) a
, b
! { dg-error "vector subscript" }
45 !9.2.2.2 and one of 9.4.1
46 !________________________
48 write(6, NML
=NL
, FMT
= '(i6)') ! { dg-error "group name and format" }
49 write(6, NML
=NL
, FMT
= 200) ! { dg-error "group name and format" }
56 !Was correctly picked up before patch.
57 write(6, NML
=NL
, iostat
= ierr
) ! { dg-warning "requires default INTEGER" }
60 !Was correctly picked up before patch.
61 write(1, fmt
='(i6)', end = 100) a
! { dg-error "END tag" }
62 !Was correctly picked up before patch.
63 write(1, fmt
='(i6)', eor
= 100) a
! { dg-error "EOR tag" }
64 !Was correctly picked up before patch.
65 write(1, fmt
='(i6)', size
= b
) a
! { dg-error "SIZE= specifier not allowed" }
68 READ(1, fmt
='(i6)', end = 900) a
! { dg-error "not defined" }
69 READ(1, fmt
='(i6)', eor
= 900, advance
='NO') a
! { dg-error "not defined" }
70 READ(1, fmt
='(i6)', ERR
= 900) a
! { dg-error "not defined" }
72 !Was correctly picked up before patch.
73 READ(1, fmt
=800) a
! { dg-error "not defined" }
80 ! { dg-final { cleanup-modules "fails global" } }