gcc/testsuite/gfortran.dg/function_optimize_12.f90
raw| 1 | ! { dg-do run } |
| 2 | ! { dg-options "-ffrontend-optimize" } |
| 3 | ! PR 53148 - this used to cause wrong code because the label was |
| 4 | ! placed after the statement assigning the new variables. |
| 5 | program main |
| 6 | integer :: n |
| 7 | double precision x |
| 8 | n = 3 |
| 9 | goto 100 |
| 10 | 100 x = dble(n) + dble(n) |
| 11 | if (x /= 6.d0) STOP 1 |
| 12 | end program main |