re PR libfortran/16935 (Segmentation fault of compiler with unsupported control items in OPEN)

2004-08-13  Bud Davis  <bdavis9659@comcast.net>

        PR gfortran/13965
        * gfortran.fortran-torture/execute/open_rewind.f90: New test.
        * io/open.c (st_open): use flags instead of the unit structure.

From-SVN: r85966
This commit is contained in:
Bud Davis 2004-08-13 22:01:02 +00:00 committed by Bud Davis
parent 3e0d5ae260
commit 1ef02b9de5
4 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2004-08-13 Bud Davis <bdavis9659@comcast.net>
* gfortran.fortran-torture/execute/open_rewind.f90: New test.
2004-08-13 Janis Johnson <janis187@us.ibm.com>
* g++.dg/ext/altivec-2.C: Revert previous changes and don't execute.

View File

@ -0,0 +1,7 @@
! { dg-do run }
! pr16935
! segfault at run time on open statement
program bug2
implicit none
open( 1 , file = "str_500.txt", position = "REWIND" )
end

View File

@ -1,3 +1,8 @@
2004-08-13 Bud Davis <bdavis9659@comcast.net>
PR gfortran/13965
* io/open.c (st_open): use flags instead of the unit structure.
2004-08-10 Victor Leikehman <lei@il.ibm.com>
* io/list_read.c (namelist_read): Convert variable names

View File

@ -506,8 +506,8 @@ st_open (void)
if (ioparm.unit < 0)
generate_error (ERROR_BAD_OPTION, "Bad unit number in OPEN statement");
if (flags.position != POSITION_UNSPECIFIED &&
u->flags.access == ACCESS_DIRECT)
if (flags.position != POSITION_UNSPECIFIED
&& flags.access == ACCESS_DIRECT)
generate_error (ERROR_BAD_OPTION,
"Cannot use POSITION with direct access files");