Commit 708c4094 by Jerry DeLisle

re PR fortran/83525 (open(newunit=funit, status="scratch") fails if an internal…

re PR fortran/83525 (open(newunit=funit, status="scratch") fails if an internal file (characters) was read previously.)

2018-01-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR libgfortran/83525
        * gfortran.dg/newunit_5.f90: New test.

From-SVN: r256595
parent abdca01e
2018-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/83525
* gfortran.dg/newunit_5.f90: New test.
2018-01-12 Vladimir Makarov <vmakarov@redhat.com> 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/80481 PR rtl-optimization/80481
......
! { dg-do run )
! PR83525 Combination of newunit and internal unit was failing.
program main
integer :: funit
logical :: isopen
integer :: this, another
character(len=:), allocatable :: message
message = "12"
read(message, *) this
if (this.ne.12) call abort
open(newunit=funit, status="scratch")
write(funit, *) "13"
rewind(funit)
read(funit, *) another
!write(*,*) another
close(funit)
if (another.ne.13) call abort
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment