This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, libgfortran] PR48960 OPEN statement modifies NEWUNIT variable on error
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: Jerry DeLisle <jvdelisle at charter dot net>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 26 Dec 2012 11:17:02 +0200
- Subject: Re: [patch, libgfortran] PR48960 OPEN statement modifies NEWUNIT variable on error
- References: <50DAAB38.4080006@charter.net>
On Wed, Dec 26, 2012 at 9:46 AM, Jerry DeLisle <jvdelisle@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 <jvdelisle@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