OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [contained2.f90] - Diff between revs 303 and 338

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

Rev 303 Rev 338
! Program to check resolution of symbols with the same name
! Program to check resolution of symbols with the same name
program contained2
program contained2
   implicit none
   implicit none
   integer var1
   integer var1
   var1 = 42
   var1 = 42
   if (f1() .ne. 1) call abort
   if (f1() .ne. 1) call abort
   call f2()
   call f2()
   if (var1 .ne. 42) call abort
   if (var1 .ne. 42) call abort
contains
contains
function f1 ()
function f1 ()
   implicit none
   implicit none
   integer f1
   integer f1
   integer var1
   integer var1
   integer f2
   integer f2
   var1 = 1
   var1 = 1
   f2 = var1
   f2 = var1
   f1 = f2
   f1 = f2
end function
end function
subroutine f2()
subroutine f2()
   implicit none
   implicit none
   if (f1() .ne. 1) call abort
   if (f1() .ne. 1) call abort
end subroutine
end subroutine
end program
end program
 
 

powered by: WebSVN 2.1.0

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