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,

Reply via email to