https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128720
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-11-16
CC| |jvdelisle at gcc dot gnu.org
--- Comment #2 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
The crash is real; trunk segfaults in 3 out of 3 runs. But the program is
invalid: F2023 12.6.4.8.3 ΒΆ19 forbids an async parent statement. So this is a
crash on invalid code. Suvarchal, was this your intent with the reproducer?
The patch also fixes this the following which is valid I think:
program p
implicit none
real :: x, y, z(2)
open (10, file='syncread.dat', form='unformatted', asynchronous='yes',
status='replace')
write (10) 1.0, 2.0
write (10) 3.0, 4.0
rewind (10)
read (10) x ! partial record, synchronous
read (10) y ! must be 3.0
print *, x, y
if (y /= 3.0) print *, 'FAIL: record not advanced'
rewind (10)
read (10, asynchronous='yes') z
wait (10)
print *, z
close (10, status='delete')
end program p