URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [initializer.f90] - Rev 303
Compare with Previous | Blame | View Log
! Program to test static variable initialization! returns the parameter from the previous invocation, or 42 on the first call.function test (parm)implicit noneinteger test, parminteger :: val = 42test = valval = parmend functionprogram intializerimplicit noneinteger testcharacter(11) :: c = "Hello World"character(15) :: d = "Teststring"integer, dimension(3) :: a = 1if (any (a .ne. 1)) call abortif (test(11) .ne. 42) call abort! The second call should returnif (test(0) .ne. 11) call abortif (c .ne. "Hello World") call abortif (d .ne. "Teststring") call abortend program
