This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/19314] New: inquire(position=) segfaults at runtime
- From: "Thomas dot Koenig at online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jan 2005 15:43:23 -0000
- Subject: [Bug libfortran/19314] New: inquire(position=) segfaults at runtime
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Because of the segfault, I assume that this is different from PR 19313.
$ cat inquire-position.f
character*20 chr
open(7)
inquire(7,position=chr)
print *,chr
end
$ gfortran inquire-position.f
$ ./a.out
Segmentation fault
$ gfortran -v ; gfortran -dumpmachine
Using built-in specs.
Configured with: ../gcc-4.0-20050102/configure --prefix=/home/zfkts
--enable-languages=c,c++,f95
Thread model: posix
gcc version 4.0.0 20050102 (experimental)
ia64-unknown-linux-gnu
$ gfortran -g inquire-position.f
$ gdb ./a.out
GNU gdb Red Hat Linux (6.1post-1.20040607.52rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "ia64-redhat-linux-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".
(gdb) r
Starting program: /home/zfkts/Krempel/a.out
Program received signal SIGSEGV, Segmentation fault.
0x20000000002cee11 in strlen () from /lib/tls/libc.so.6.1
(gdb) bt
#0 0x20000000002cee11 in strlen () from /lib/tls/libc.so.6.1
#1 0x2000000000052470 in *_gfortrani_cf_strcpy (dest=0x0, dest_len=0, src=0x0)
at ../../../gcc-4.0-20050102/libgfortran/runtime/string.c:84
#2 0x20000000000a3890 in inquire_via_unit (u=0x600000000000a2e0)
at ../../../gcc-4.0-20050102/libgfortran/io/inquire.c:166
#3 0x20000000000a48a0 in *_gfortran_st_inquire ()
at ../../../gcc-4.0-20050102/libgfortran/io/inquire.c:370
#4 0x4000000000000cb0 in MAIN__ () at inquire-position.f:3
#5 0x4000000000000df0 in main (argc=1, argv=0x60000fffffffa108)
at ../../../gcc-4.0-20050102/libgfortran/fmain.c:18
(gdb)
--
Summary: inquire(position=) segfaults at runtime
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Thomas dot Koenig at online dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19314