[patch, fortran] Set implicit ASYNCHRONOUS attribute
Thomas Koenig
tkoenig@netcologne.de
Wed Oct 4 21:41:00 GMT 2017
Hello world,
the attached patch sets the implicit ASYNCHRONPUS according to F2008,
9.6.2.5:
# If a variable is used in an asynchronous data transfer statement as
# ⢠an item in an input/output list,
# ⢠a group object in a namelist, or
# ⢠a SIZE= specifier
# the base object of the data-ref is implicitly given the ASYNCHRONOUS
attribute in the scoping unit of the
# data transfer statement. This attribute may be confirmed by explicit
declaration.
At the moment, the only thing this does is show up on the fortran tree
dump. This will hopefully change once asynchronous I/O is implemented.
And if you are wondering why I put setting the global variable into
check_io_constraints: It is because the parsing of the YES/NO
is done there, and I didn't want to duplicate the code.
No test case because we don't (yet) have tests for -fdump-fortran-original.
Regression-tested. OK for trunk?
Regards
Thomas
2017-10-04 Thomas Koenig <tkoenig@gcc.gnu.org>
* gfortran.h (async_io_dt): Add external reference.
* io.c (async_io_dt): Add variable.
(compare_to_allowed_values): Add prototyte. Add optional argument
num. If present, set it to the number of the entry that was
matched.
(check_io_constraints): If this is for an asynchronous I/O
statement, set async_io_dt and set the asynchronous flag for
a SIZE tag.
* resolve.c (resolve_transfer): If async_io_dt is set, set
the asynchronous flag on the variable.
(resolve_fl_namelist): If async_io_dt is set, set the asynchronous
flag on all elements of the namelist.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.diff
Type: text/x-patch
Size: 3032 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20171004/89decb7e/attachment.bin>
More information about the Fortran
mailing list