[Bug libfortran/88411] [9 Regression] Random crashes for ASYNCHRONOUS writes (bad locking?)
tkoenig at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Dec 9 13:49:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88411
--- Comment #7 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
This looks like it could do the trick:
Index: io/transfer.c
===================================================================
--- io/transfer.c (Revision 266250)
+++ io/transfer.c (Arbeitskopie)
@@ -3189,7 +3189,7 @@ data_transfer_init (st_parameter_dt *dtp, int read
}
}
- if (au)
+ if (au && dtp->u.p.async)
{
NOTE ("enqueue_data_transfer");
enqueue_data_transfer_init (au, dtp, read_flag);
@@ -4401,7 +4401,7 @@ st_write_done (st_parameter_dt *dtp)
{
if (dtp->u.p.current_unit)
{
- if (dtp->u.p.current_unit->au)
+ if (dtp->u.p.current_unit->au && dtp->u.p.async)
{
if (dtp->common.flags & IOPARM_DT_HAS_ID)
*dtp->id = enqueue_done_id (dtp->u.p.current_unit->au,
More information about the Gcc-bugs
mailing list