URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 303 |
Rev 384 |
! Snippet to test various allocate statements
|
! Snippet to test various allocate statements
|
|
|
program test_allocate
|
program test_allocate
|
implicit none
|
implicit none
|
type t
|
type t
|
integer i
|
integer i
|
real r
|
real r
|
end type
|
end type
|
type pt
|
type pt
|
integer, pointer :: p
|
integer, pointer :: p
|
end type
|
end type
|
integer, allocatable, dimension(:, :) :: a
|
integer, allocatable, dimension(:, :) :: a
|
type (t), pointer, dimension(:) :: b
|
type (t), pointer, dimension(:) :: b
|
type (pt), pointer :: c
|
type (pt), pointer :: c
|
integer, pointer:: p
|
integer, pointer:: p
|
integer n
|
integer n
|
|
|
n = 10
|
n = 10
|
allocate (a(1:10, 4))
|
allocate (a(1:10, 4))
|
allocate (a(5:n, n:14))
|
allocate (a(5:n, n:14))
|
allocate (a(6, 8))
|
allocate (a(6, 8))
|
allocate (b(n))
|
allocate (b(n))
|
allocate (c)
|
allocate (c)
|
allocate (c%p)
|
allocate (c%p)
|
allocate (p)
|
allocate (p)
|
end program
|
end program
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.