Retro68/gcc/gcc/testsuite/gfortran.dg/newunit_3.f90
2018-12-28 16:30:48 +01:00

8 lines
243 B
Fortran

! { 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) STOP 1
end program test_newunit