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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [arraysave.f90] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 695 jeremybenn
! Program to test arrays with the save attribute
2
program testarray
3
   implicit none
4
   integer, save, dimension (6, 5) :: a, b
5
 
6
   a = 0
7
   a(1, 1) = 42
8
   a(6, 5) = 43
9
   b(:,1:5) = a
10
 
11
   call fn (a)
12
contains
13
subroutine fn (a)
14
   implicit none
15
   integer, dimension(1:, 1:) :: a
16
   integer, dimension(2) :: b
17
 
18
   b = ubound (a)
19
   if (any (b .ne. (/6, 5/))) call abort
20
   if (a(1, 1) .ne. 42) call abort
21
   if (a(6, 5) .ne. 43) call abort
22
end subroutine
23
end program
24
 

powered by: WebSVN 2.1.0

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