URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
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
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.