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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [assumed_dummy_1.f90] - Diff between revs 154 and 816

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

Rev 154 Rev 816
! { dg do-run}
! { dg do-run}
! Tests the fix for PRs 19358, 19477, 21211 and 21622.
! Tests the fix for PRs 19358, 19477, 21211 and 21622.
!
!
! Note that this tests only the valid cases with explicit interfaces.
! Note that this tests only the valid cases with explicit interfaces.
!
!
! Contributed by Paul Thomas  
! Contributed by Paul Thomas  
!
!
module global
module global
contains
contains
  SUBROUTINE goo (x, i)
  SUBROUTINE goo (x, i)
    REAL, DIMENSION(i:)     :: x
    REAL, DIMENSION(i:)     :: x
    integer                 :: i
    integer                 :: i
    x (3) = 99.0
    x (3) = 99.0
  END SUBROUTINE goo
  END SUBROUTINE goo
end module global
end module global
SUBROUTINE foo (x, i)
SUBROUTINE foo (x, i)
  REAL, DIMENSION(i:)       :: x
  REAL, DIMENSION(i:)       :: x
  integer                   :: i
  integer                   :: i
  x (4) = 42.0
  x (4) = 42.0
END SUBROUTINE foo
END SUBROUTINE foo
program test
program test
  use global
  use global
  real, dimension(3)        :: y = 0
  real, dimension(3)        :: y = 0
  integer                   :: j = 2
  integer                   :: j = 2
interface
interface
  SUBROUTINE foo (x, i)
  SUBROUTINE foo (x, i)
    REAL, DIMENSION(i:)     :: x
    REAL, DIMENSION(i:)     :: x
    integer                 :: i
    integer                 :: i
  END SUBROUTINE foo
  END SUBROUTINE foo
end interface
end interface
  call foo (y, j)
  call foo (y, j)
  call goo (y, j)
  call goo (y, j)
  call roo (y, j)
  call roo (y, j)
  if (any(y.ne.(/21.0, 99.0, 42.0/))) call abort ()
  if (any(y.ne.(/21.0, 99.0, 42.0/))) call abort ()
contains
contains
  SUBROUTINE roo (x, i)
  SUBROUTINE roo (x, i)
    REAL, DIMENSION(i:)     :: x
    REAL, DIMENSION(i:)     :: x
    integer                 :: i
    integer                 :: i
    x (2) = 21.0
    x (2) = 21.0
  END SUBROUTINE roo
  END SUBROUTINE roo
end program test
end program test
! { dg-final { cleanup-modules "global" } }
! { dg-final { cleanup-modules "global" } }
 
 

powered by: WebSVN 2.1.0

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