[Bug libfortran/48960] OPEN statement modifies NEWUNIT variable on error
jvdelisle at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 25 04:52:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48960
--- Comment #3 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2012-12-25 04:52:04 UTC ---
A slight modification and still testing.
@@ -859,6 +856,10 @@ st_open (st_parameter_open *opp)
else
already_open (opp, u, &flags);
}
-
+
+ if ((opp->common.flags & IOPARM_OPEN_HAS_NEWUNIT)
+ && (opp->common.flags & IOPARM_LIBRETURN_MASK) == IOPARM_LIBRETURN_OK)
+ *opp->newunit = opp->common.unit;
+
library_end ();
}
More information about the Gcc-bugs
mailing list