2 ! Part I of the test of the IO constraints patch, which fixes PRs:
3 ! PRs 25053, 25063, 25064, 25066, 25067, 25068, 25069, 25307 and 20862.
5 ! Contributed by Paul Thomas <pault@gcc.gnu.org>
9 2000 format (1h
, 2i6
) ! { dg-error "Format statement in module" }
23 100 format (1h
, "i=", i6
) ! This is OK.
31 character*80 :: buffer(3)
33 ! Appending to a USE associated namelist is an extension.
35 NAMELIST /NL
/ a
,b
! { dg-warning "already is USE associated" }
40 write(c
, *) a
, b
! { dg-error "array" }
41 !Was correctly picked up before patch.
42 write(buffer((/3,1,2/)), *) a
, b
! { dg-error "vector subscript" }
44 !9.2.2.2 and one of 9.4.1
45 !________________________
47 write(6, NML
=NL
, FMT
= '(i6)') ! { dg-error "group name and format" }
48 write(6, NML
=NL
, FMT
= 200) ! { dg-error "group name and format" }
55 !Was correctly picked up before patch.
56 write(6, NML
=NL
, iostat
= ierr
) ! { dg-warning "requires default INTEGER" }
57 READ(1, fmt
='(i6)', advance
='NO', size
= 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" } }