URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [retarray.f90] - Rev 695
Compare with Previous | Blame | View Log
! Program to test functions returning arraysprogram testfnarrayimplicit noneinteger, dimension (6, 5) :: ainteger n! These first two shouldn't require a temporary.a = 0a = test(6, 5)if (a(1,1) .ne. 42) call abortif (a(6,5) .ne. 43) call aborta = 0a(1:6:2, 2:5) = test2()if (a(1,2) .ne. 42) call abortif (a(5,5) .ne. 43) call aborta = 1! This requires a temporarya = test(6, 5) - aif (a(1,1) .ne. 41) call abortif (a(6,5) .ne. 42) call abortcontainsfunction test (x, y)implicit noneinteger x, yinteger, dimension (1:x, 1:y) :: testtest(1, 1) = 42test(x, y) = 43end functionfunction test2 () result (foo)implicit noneinteger, dimension (3, 4) :: foofoo(1, 1) = 42foo(3, 4) = 43end functionend program
