flang
flang copied to clipboard
A bug with no advance WRITE
Here is test case which can not output the right result. It is expected output "abcxxx", but the result it just "abc".
program test
character(len=20) :: rslts
! write something no advance
open(10,file="fort.10",position="rewind")
write(10, '(a,t1,a)',advance='no') 'xxxxxx', 'abc'
close(10)
! check what is in the first record
open(10,file="fort.10",position="rewind")
read(10,'(a)') rslts
close(10, status="delete")
if (rslts .ne. "abcxxx") STOP 1
end program