1! PR15620 2! Check that evaluating a statement function doesn't affect the value of 3! its dummy argument variables. 4program 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 13contains 14function foo (x) 15 integer z, y, foo, x 16 bar(z) = z*z 17 z = 42 18 t = bar(x) 19 foo = t + z 20end function 21end program 22