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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 695 jeremybenn
! Program to test static variable initialization
2
! returns the parameter from the previous invocation, or 42 on the first call.
3
function test (parm)
4
   implicit none
5
   integer test, parm
6
   integer :: val = 42
7
 
8
   test = val
9
   val = parm
10
end function
11
 
12
program intializer
13
   implicit none
14
   integer test
15
   character(11) :: c = "Hello World"
16
   character(15) :: d = "Teststring"
17
   integer, dimension(3) :: a = 1
18
 
19
   if (any (a .ne. 1)) call abort
20
   if (test(11) .ne. 42) call abort
21
   ! The second call should return
22
   if (test(0) .ne. 11) call abort
23
 
24
   if (c .ne. "Hello World") call abort
25
   if (d .ne. "Teststring") call abort
26
end program

powered by: WebSVN 2.1.0

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