OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [io_constraints_1.f90] - Diff between revs 302 and 384

Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 384
! { dg-do compile }
! { dg-do compile }
! { dg-options "-std=f95" }
! { dg-options "-std=f95" }
! Part I of the test  of the IO constraints patch, which fixes PRs:
! Part I of the test  of the IO constraints patch, which fixes PRs:
! PRs 25053, 25063, 25064, 25066, 25067, 25068, 25069, 25307 and 20862.
! PRs 25053, 25063, 25064, 25066, 25067, 25068, 25069, 25307 and 20862.
!
!
! Contributed by Paul Thomas  
! Contributed by Paul Thomas  
!
!
module fails
module fails
 2000 format (1h , 2i6)                        ! { dg-error "Format statement in module" }
 2000 format (1h , 2i6)                        ! { dg-error "Format statement in module" }
end module fails
end module fails
module global
module global
  integer :: modvar
  integer :: modvar
  namelist /NL/ modvar
  namelist /NL/ modvar
contains
contains
  subroutine foo (i)
  subroutine foo (i)
    integer :: i
    integer :: i
    write (*, 100) i
    write (*, 100) i
 100 format (1h , "i=", i6)                     ! { dg-warning "The H format specifier at ... is a Fortran 95 deleted feature" }
 100 format (1h , "i=", i6)                     ! { dg-warning "The H format specifier at ... is a Fortran 95 deleted feature" }
  end subroutine foo
  end subroutine foo
end module global
end module global
 use global
 use global
 integer :: a,b, c(20)
 integer :: a,b, c(20)
 integer(8) :: ierr
 integer(8) :: ierr
 character(80) :: buffer(3)
 character(80) :: buffer(3)
! Appending to a USE associated namelist is an extension.
! Appending to a USE associated namelist is an extension.
 NAMELIST /NL/ a,b                              ! { dg-warning "already is USE associated" }
 NAMELIST /NL/ a,b                              ! { dg-warning "already is USE associated" }
 a=1 ; b=2
 a=1 ; b=2
!9.2.2.1:
!9.2.2.1:
 write(c, *) a, b                               !  { dg-error "array" }
 write(c, *) a, b                               !  { dg-error "array" }
!Was correctly picked up before patch.
!Was correctly picked up before patch.
 write(buffer((/3,1,2/)), *) a, b               !  { dg-error "vector subscript" }
 write(buffer((/3,1,2/)), *) a, b               !  { dg-error "vector subscript" }
!9.2.2.2 and one of 9.4.1
!9.2.2.2 and one of 9.4.1
!________________________
!________________________
 write(6, NML=NL, FMT = '(i6)')                 !  { dg-error "group name and format" }
 write(6, NML=NL, FMT = '(i6)')                 !  { dg-error "group name and format" }
 write(6, NML=NL, FMT = 200)                    !  { dg-error "group name and format" }
 write(6, NML=NL, FMT = 200)                    !  { dg-error "group name and format" }
!9.4.1
!9.4.1
!_____
!_____
!
!
! R912
! R912
!Was correctly picked up before patch.
!Was correctly picked up before patch.
 write(6, NML=NL, iostat = ierr)                ! { dg-warning "requires default INTEGER" }
 write(6, NML=NL, iostat = ierr)                ! { dg-warning "requires default INTEGER" }
! Constraints
! Constraints
!Was correctly picked up before patch.
!Was correctly picked up before patch.
 write(1, fmt='(i6)', end = 100) a              ! { dg-error "END tag" }
 write(1, fmt='(i6)', end = 100) a              ! { dg-error "END tag" }
!Was correctly picked up before patch.
!Was correctly picked up before patch.
 write(1, fmt='(i6)', eor = 100) a              ! { dg-error "EOR tag" }
 write(1, fmt='(i6)', eor = 100) a              ! { dg-error "EOR tag" }
!Was correctly picked up before patch.
!Was correctly picked up before patch.
 write(1, fmt='(i6)', size = b) a               ! { dg-error "SIZE= specifier not allowed" }
 write(1, fmt='(i6)', size = b) a               ! { dg-error "SIZE= specifier not allowed" }
 READ(1, fmt='(i6)', end = 900) a               ! { dg-error "not defined" }
 READ(1, fmt='(i6)', end = 900) a               ! { dg-error "not defined" }
 READ(1, fmt='(i6)', eor = 900, advance='NO') a ! { dg-error "not defined" }
 READ(1, fmt='(i6)', eor = 900, advance='NO') a ! { dg-error "not defined" }
 READ(1, fmt='(i6)', ERR = 900) a               ! { dg-error "not defined" }
 READ(1, fmt='(i6)', ERR = 900) a               ! { dg-error "not defined" }
!Was correctly picked up before patch.
!Was correctly picked up before patch.
 READ(1, fmt=800) a                             ! { dg-error "not defined" }
 READ(1, fmt=800) a                             ! { dg-error "not defined" }
100 continue
100 continue
200 format (2i6)
200 format (2i6)
 END
 END
! { dg-final { cleanup-modules "fails global" } }
! { dg-final { cleanup-modules "fails global" } }
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.