On 10/25/2016 11:52 AM, Fritz Reese wrote:
All,
Here's the big one. This patch proposes an extension to both the GNU
Fortran front-end and runtime library (libgfortran) to support three
additional I/O specifiers: CARRIAGECONTROL, READONLY, and SHARE for
compatibility with legacy compilers/code.
Here's a summary of what the specifiers actually do:
CARRIAGECONTROL is to control line termination settings between output records.
READONLY implies ACTION='READ' and additionally prevents
STATUS='DELETE' from deleting a file on CLOSE.
SHARE provides OS-level locks.
These specifiers are designed to match the syntax and behavior of
legacy compilers. For more info see the attached test cases, source
code, and documentation.
Each comes with an IOPARM_OPEN_ bit, and CC+SHARE have IOPARM_INQUIRE_
bits. The st_parameter_dt structure needs an additional two bytes to
propagate information with CARRIAGECONTROL='FORTRAN'. These two bytes
still leave plenty of trailing 'pad' for future expansion.
Bootstraps and regtests on x86_64-redhat-linux. There's a fair bit to
sift through, so feel free to ask for clarification or provide
comments/constructive criticism.
OK for trunk?
I have started reviewing this. I assume you have tested on some if not all of
your DEC code base. Have you compared results with ifort?
How have you tested the SHARE feature? Do you have a test with multiple threads
accessing a single file? or do I misunderstand that feature? (I don't mean in
the testsuite, I mean as just your own testing.)
Jerry