PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / newunit_5.f90.f90
blobde3eb0009051f36db603892e14e301a5b576522e
1 ! { dg-do run )
2 ! PR83525 Combination of newunit and internal unit was failing.
3 program main
4 integer :: funit
5 logical :: isopen
6 integer :: this, another
7 character(len=:), allocatable :: message
9 message = "12"
10 read(message, *) this
11 if (this.ne.12) STOP 1
13 open(newunit=funit, status="scratch")
14 write(funit, *) "13"
15 rewind(funit)
16 read(funit, *) another
17 !write(*,*) another
18 close(funit)
19 if (another.ne.13) STOP 2
20 end