2 ! Check that rewind doesn't delete a file.
3 ! Writing to the file truncates it at the end of the current record. Out
4 ! IO library was defering the actual truncation until the file was rewound.
5 ! A second rewind would then (incorrectly) think the file had just been
6 ! written to, and truncate the file to zero length.
9 open(unit=11, status="SCRATCH")
10 write(11, '(a11)') "Hello World"
16 if (s .ne. "Hello World") call abort