[Bug fortran/25829] [F2003] Asynchronous IO support

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jan 8 10:11:00 GMT 2010



------- Comment #16 from burnus at gcc dot gnu dot org  2010-01-08 10:11 -------
For completeness: I just committed support for the ASYNCHRONOUS attribute:
  http://gcc.gnu.org/ml/fortran/2010-01/msg00049.html
  http://gcc.gnu.org/ml/gcc-cvs/2010-01/msg00192.html
which is treated as no op.

One needs to think carefully whether one needs to take care of ASYNCHRONOUS for
the middle end when real async I/O is implemented. For a simple:
  write(9, ..., asynchronous='yes') foo
  ...
  write(9, ...) ! force WAIT on unit 9
  foo = 8
presumably not using "&foo" in the first write call lets the address escape
thus unless a function is known (to the ME) to not touch "foo" (indirectly), no
problem should occur. But how about:

  ! Note: using "foo" in AIO implies the ASYNCHRONOUS attribute for foo
  write(9, ..., asynchronous='yes', id=waitid) foo
  call finish(foo, waitid)
contains
  subroutine finish(var, wait)
    asynchronous :: var
    wait(wait)
    var = 7
  end subroutine finish

Here, the ME might be tempted to change the order of WAIT and "var = 7"; thus
in this case we probably need to tell the ME about the ASYNCHRONOUS attribute.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25829



More information about the Gcc-bugs mailing list