* Erroneous "Inquire statement identifies an internal file" error
@ 2018-02-15 19:36 Andrew Benson
0 siblings, 0 replies; only message in thread
From: Andrew Benson @ 2018-02-15 19:36 UTC (permalink / raw)
To: gfortran
I've opened PR 84412 for the following problem:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84412
Using gfortran 8.0.1 (r257607) the following produces an erroneous error of
"Inquire statement identifies an internal file":
program bug
implicit none
integer :: i
character(len=1) :: s
write (s,'(i1)') 0
open(newUnit=i,file='bug.txt',status='unknown')
inquire(unit=i)
end program bug
$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/abenson/Galacticus/Tools/libexec/gcc/x86_64-pc-
linux-gnu/8.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/home/abenson/Galacticus/Tools
--enable-languages=c,c++,fortran --disable-multilib
Thread model: posix
gcc version 8.0.1 20180212 (experimental) (GCC)
$ gfortran bug.F90
$ a.out
At line 7 of file bug.F90
Fortran runtime error: Inquire statement identifies an internal file
Error termination. Backtrace:
#0 0x7fd470750d44 in inquire_via_unit
at ../../../gcc-trunk/libgfortran/io/inquire.c:47
#1 0x400969 in ???
#2 0x4009a0 in ???
#3 0x7fd46fb7ed0c in __libc_start_main
at /data001/abenson/Galacticus/Tools/glibc-2.12.1/csu/libc-start.c:226
#4 0x4006f8 in ???
If the WRITE statement is removed the error does not occur.
--
* Andrew Benson: http://users.obs.carnegiescience.edu/abenson/contact.html
* Galacticus: http://sites.google.com/site/galacticusmodel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-02-15 19:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-15 19:36 Erroneous "Inquire statement identifies an internal file" error Andrew Benson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).