[Bug libfortran/20163] gfortran - error opening direct access file
dir at lanl dot gov
gcc-bugzilla@gcc.gnu.org
Sun Feb 27 19:26:00 GMT 2005
------- Additional Comments From dir at lanl dot gov 2005-02-27 14:05 -------
Looks like a missing call to library_end ()in open.c. I added that one line and
the recursive error went away -
[dir:~/tests/gfortran] dir% gfortran -o recursive3 recursive3.f
[dir:~/tests/gfortran] dir% recursive3
[dir:~/tests/gfortran] dir% cat recursive3.f
open(10,status="foo",err=100)
call abort
100 continue
open(10,status="scratch")
end
>
[dir:~] dir% diff -c /Users/dir/junk/io/open.c
/Users/dir/gfortran/gcc/libgfortran/io/open.c
*** /Users/dir/junk/io/open.c Sat Jan 22 16:14:30 2005
--- /Users/dir/gfortran/gcc/libgfortran/io/open.c Sat Feb 26 21:36:28 2005
***************
*** 480,488 ****
if (flags.position == POSITION_UNSPECIFIED)
flags.position = POSITION_ASIS;
! if (ioparm.library_return != LIBRARY_OK)
return;
!
u = find_unit (ioparm.unit);
if (u == NULL)
--- 480,489 ----
if (flags.position == POSITION_UNSPECIFIED)
flags.position = POSITION_ASIS;
! if (ioparm.library_return != LIBRARY_OK){
! library_end ();
return;
! }
u = find_unit (ioparm.unit);
if (u == NULL)
(In reply to comment #5)
> Here is a reduced test case for the second error:
>
> $ cat open-after-error.f
> open(10,status="foo",err=100)
> call abort
> 100 continue
> open(10,status="scratch")
> end
> $ cat open-after-error.f
> open(10,status="foo",err=100)
> call abort
> 100 continue
> open(10,status="scratch")
> end
> $ gfortran open-after-error.f
> $ ./a.out
> At line 4 of file open-after-error.f
> Internal Error: Recursive library calls not allowed
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20163
More information about the Gcc-bugs
mailing list