------- Comment #4 from jvdelisle at gcc dot gnu dot org 2008-01-16 05:32 ------- I am not making a decision here yet. I will keep this PR open until I fix another minor issue I have found.
I would like to comment that to do what you want to do here without any ambiguity your code should be using INQUIRE(unit=19, opened=opn, access=acc) and test the two conditions to determine what to do: if (opn .and. acc="DIRECT ... do your direct stuff end if This is truly the most portable way to do it. I will also add that just taking the F2003 standard at face value, gfortran has this right, IMHO. The standard does not assume that a unit is a particular kind of device or I/O unit. There are device types that just simply can not be access as DIRECT. Respectfully, I think this is one of the most commonly misunderstood Fortran features. Its understandably frustrating. I will return to this in a few days. I have two other bugs in front. (BTW, I already have a trivial patch that will change gfortran behavior, complexity of the fix is not the issue) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34795