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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 695 jeremybenn
! PR15620
2
! Check that evaluating a statement function doesn't affect the value of
3
! its dummy argument variables.
4
program st_function_2
5
  integer fn, a, b
6
  fn(a, b) = a + b
7
  if (foo(1) .ne. 43) call abort
8
 
9
  ! Check that values aren't modified when avaluating the arguments.
10
  a = 1
11
  b = 5
12
  if (fn (b + 2, a + 3) .ne. 11) call abort
13
contains
14
function foo (x)
15
  integer z, y, foo, x
16
  bar(z) = z*z
17
  z = 42
18
  t = bar(x)
19
  foo = t + z
20
end function
21
end program

powered by: WebSVN 2.1.0

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