PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / function_optimize_4.f90
blob20fc46d3078b58931907e1bb9cc82f385101f372
1 ! { dg-do run }
2 ! { dg-options "-O" }
3 ! PR 48412 - function elimination got temporary varibles in the wrong order.
4 ! Test case contributed by Joost VandeVondele.
6 INTEGER FUNCTION S1(m,ma,lx)
7 INTEGER :: m,ma,lx
9 IF (((m < 0).AND.(MODULO(ABS(ma-lx),2) == 1)).OR.&
10 ((m > 0).AND.(MODULO(ABS(ma-lx),2) == 0))) THEN
11 S1=1
12 ELSE
13 S1=0
14 ENDIF
16 END FUNCTION
18 INTEGER :: s1
19 IF (S1(1,2,1).NE.0) CALL ABORT()
20 END