gcc/testsuite/gfortran.dg/auto_save_1.f90
raw| 1 | ! { dg-do run } |
| 2 | ! Check that automatic objects work properly in the presence of a save |
| 3 | ! statement. |
| 4 | ! PR21034 |
| 5 | subroutine test(n) |
| 6 | implicit none |
| 7 | integer n |
| 8 | real dte(n) |
| 9 | character(len=n) :: s |
| 10 | save |
| 11 | dte = 0 |
| 12 | s = "" |
| 13 | end |
| 14 | |
| 15 | program prog |
| 16 | call test(4) |
| 17 | call test(10) |
| 18 | end program |