public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Thomas dot Koenig at online dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/19314] New: inquire(position=) segfaults at runtime
Date: Fri, 07 Jan 2005 15:43:00 -0000	[thread overview]
Message-ID: <20050107154319.19314.Thomas.Koenig@online.de> (raw)

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


             reply	other threads:[~2005-01-07 15:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-07 15:43 Thomas dot Koenig at online dot de [this message]
2005-01-17  4:39 ` [Bug libfortran/19314] " bdavis at gcc dot gnu dot org
2005-01-17  4:41 ` pinskia at gcc dot gnu dot org
2005-01-22  3:51 ` cvs-commit at gcc dot gnu dot org
2005-01-22  7:00 ` pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050107154319.19314.Thomas.Koenig@online.de \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).