summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/newunit_3.f90
blob: a0e5a8a75a7a9343fe05c33b722f3874e277e7a9 (plain)
1
2
3
4
5
6
7
! { dg-do run }
! PR48960 On ERROR newunit should not modify user variable.
program test_newunit
    integer :: st, un = 0
    open (newunit=un, file='nonexisting.dat', status='old', iostat=st)
    if (un /= 0) call abort
end program test_newunit