Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gfortran.fortran-torture / execute / st_function_2.f90
blob2dec735625fabce77d19950a7aa807ffad68bd49
1 ! 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
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