2 ! PR40008 F2008: Add NEWUNIT= for OPEN statement
3 ! Contributed by Jerry DeLisle <jvdelisle@gcc.gnu.org>
5 character(len
=25) :: str
6 integer(1) :: myunit
, myunit2
9 open(newunit
=myunit
, status
="scratch")
10 open(newunit
= myunit2
, file
="newunit_1file")
11 write(myunit
,'(e24.15e2)') 1.0d0
12 write(myunit2
,*) "abcdefghijklmnop"
16 read(myunit2
,'(a)') str
17 if (str
.ne
." abcdefghijklmnop") call abort
19 close(myunit2
, status
="delete")