On Wed, Dec 26, 2012 at 9:46 AM, Jerry DeLisle <jvdeli...@charter.net> wrote: > The attached patch fixes this bug by not assigning the new unit value to the > user variable until after the OPEN is successful. > > Regression tested on Linux X86-64. > > OK for trunk with the test case from the PR?
Ok. Thanks for the patch. > > Regards, > > Jerry > > 2012-12-26 Jerry DeLisle <jvdeli...@gcc.gnu.org> > > PR libfortran/48960 > * io/open.c (st_parameter_open): Assign newunit number to user > variable only if the the associated open statement is successful. -- Janne Blomqvist