2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / arithmetic_if.f90
blob16dccae03fcda1e1ef527aac50d1f27aaf944785
1 ! { dg-do run }
2 ! { dg-options "-w" }
3 ! Test program for PR 28439
4 integer function myfunc(i)
5 integer i
6 integer, save :: value = 2
7 value = value - 1 + 0 * i
8 myfunc = value
9 end function myfunc
11 program pr28439
13 integer myfunc
15 if (myfunc(0)) 10, 20, 30 ! Should go to 30
16 10 call abort
17 20 call abort
19 30 if (myfunc(0)) 40, 50, 60 ! Should go to 50
20 40 call abort
21 60 call abort
23 50 if (myfunc(0)) 70, 80, 90 ! Should go to 70
24 80 call abort
25 90 call abort
27 70 continue
29 end program pr28439