URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 303 |
Rev 338 |
program ptr
|
program ptr
|
implicit none
|
implicit none
|
integer, pointer, dimension(:) :: a, b
|
integer, pointer, dimension(:) :: a, b
|
integer, pointer :: p
|
integer, pointer :: p
|
integer, target :: i
|
integer, target :: i
|
|
|
allocate (a(1:6))
|
allocate (a(1:6))
|
|
|
a = (/ 1, 2, 3, 4, 5, 6 /)
|
a = (/ 1, 2, 3, 4, 5, 6 /)
|
b => a
|
b => a
|
if (any (b .ne. (/ 1, 2, 3, 4, 5, 6 /))) call abort
|
if (any (b .ne. (/ 1, 2, 3, 4, 5, 6 /))) call abort
|
b => a(1:6:2)
|
b => a(1:6:2)
|
if (any (b .ne. (/ 1, 3, 5/))) call abort
|
if (any (b .ne. (/ 1, 3, 5/))) call abort
|
|
|
p => i
|
p => i
|
i = 42
|
i = 42
|
if (p .ne. 42) call abort
|
if (p .ne. 42) call abort
|
p => a(4)
|
p => a(4)
|
if (p .ne. 4) call abort
|
if (p .ne. 4) call abort
|
end program
|
end program
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.