| 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 |
| 10 |
|
| 11 |
program pr28439 |
| 12 |
|
| 13 |
integer myfunc |
| 14 |
|
| 15 |
if (myfunc(0)) 10, 20, 30 ! Should go to 30 |
| 16 |
10 STOP 1 |
| 17 |
20 STOP 2 |
| 18 |
|
| 19 |
30 if (myfunc(0)) 40, 50, 60 ! Should go to 50 |
| 20 |
40 STOP 3 |
| 21 |
60 STOP 4 |
| 22 |
|
| 23 |
50 if (myfunc(0)) 70, 80, 90 ! Should go to 70 |
| 24 |
80 STOP 5 |
| 25 |
90 STOP 6 |
| 26 |
|
| 27 |
70 continue |
| 28 |
|
| 29 |
end program pr28439 |
| 30 |
|
| 31 |
|