diff options
Diffstat (limited to 'gcc/testsuite/gfortran.fortran-torture/execute/save_2.f90')
-rw-r--r-- | gcc/testsuite/gfortran.fortran-torture/execute/save_2.f90 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/save_2.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/save_2.f90 new file mode 100644 index 000000000..c3775bbec --- /dev/null +++ b/gcc/testsuite/gfortran.fortran-torture/execute/save_2.f90 @@ -0,0 +1,23 @@ +! PR fortran/18518 + program main + call foo + call bar + call foo + end program main + + subroutine foo + integer i,g,h + data i/0/ + equivalence (g,h) + save g + if (i == 0) then + i = 1 + h = 12345 + end if + if (h .ne. 12345) call abort + end subroutine foo + + subroutine bar + integer a(10) + a = 34 + end subroutine bar |