gcc/testsuite/gfortran.dg/write_padding.f90
raw| 1 | ! { dg-do run } |
| 2 | ! PR25264 Verify that the internal unit, str, is not cleared |
| 3 | ! before it is needed elsewhere. This is an extension. |
| 4 | ! Test derived from test case by JPR. Contributed by |
| 5 | ! Jerry DeLisle <[email protected]>. |
| 6 | program write_padding |
| 7 | character(len=10) :: str |
| 8 | real :: atime |
| 9 | str = '123' |
| 10 | write( str, '(a3,i1)' ) trim(str),4 |
| 11 | if (str.ne."1234") STOP 1 |
| 12 | end program write_padding |
| 13 |