public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/31258]  New: segfault with transpose(reshape(char))
Date: Sun, 18 Mar 2007 22:28:00 -0000	[thread overview]
Message-ID: <bug-31258-10391@http.gcc.gnu.org/bugzilla/> (raw)

In trying to reduce PR 31197, I stumbled across a segfault:

$ cat bar.f90
CHARACTER(LEN=3), DIMENSION(10) :: Z
CHARACTER(LEN=10) :: res
Z(:)="123"
write(*,'(10A1)') TRANSPOSE(RESHAPE(Z(:)(2:2),(/5,2/)))
END
...
(gdb) r bar.f90
Starting program: /home/ig25/libexec/gcc/i686-pc-linux-gnu/4.3.0/f951 bar.f90
Failed to read a valid object file image from memory.
 MAIN__
Program received signal SIGSEGV, Segmentation fault.
0x080ccca3 in gfc_conv_function_call (se=0xbf8680e0, sym=0x880f9e8,
    arg=0x8849650, append_args=0x0)
    at /home/ig25/gcc/trunk/gcc/fortran/trans-expr.c:2032
2032      need_interface_mapping = ((sym->ts.type == BT_CHARACTER
(gdb) bt
#0  0x080ccca3 in gfc_conv_function_call (se=0xbf8680e0, sym=0x880f9e8,
    arg=0x8849650, append_args=0x0)
    at /home/ig25/gcc/trunk/gcc/fortran/trans-expr.c:2032
#1  0x080d7edb in gfc_conv_intrinsic_funcall (se=0xbf8680e0, expr=0x8849c78)
    at /home/ig25/gcc/trunk/gcc/fortran/trans-intrinsic.c:1514
#2  0x080cd407 in gfc_conv_function_expr (se=0xbf8680e0, expr=0x880f9e8)
    at /home/ig25/gcc/trunk/gcc/fortran/trans-expr.c:2657
#3  0x080cdb89 in gfc_conv_expr (se=0xbf8680e0, expr=0x8849c78)
    at /home/ig25/gcc/trunk/gcc/fortran/trans-expr.c:3097
#4  0x080b9ebd in gfc_add_loop_ss_code (loop=0xbf8681ec, ss=0x880f900,
    subscript=0 '\0') at /home/ig25/gcc/trunk/gcc/fortran/trans-array.c:1803
#5  0x080ba766 in gfc_conv_loop_setup (loop=0xbf8681ec)
    at /home/ig25/gcc/trunk/gcc/fortran/trans-array.c:3232
#6  0x080db6fc in gfc_trans_transfer (code=0x884a2f0)
    at /home/ig25/gcc/trunk/gcc/fortran/trans-io.c:1850
#7  0x080b17a9 in gfc_trans_code (code=0x884a2f0)
    at /home/ig25/gcc/trunk/gcc/fortran/trans.c:605
#8  0x080ddc04 in build_dt (function=0xb7bba310, code=0x884a3b0)
    at /home/ig25/gcc/trunk/gcc/fortran/trans-io.c:1507
#9  0x080b17cb in gfc_trans_code (code=0x884a3b0)
    at /home/ig25/gcc/trunk/gcc/fortran/trans.c:581
#10 0x080c75e3 in gfc_generate_function_code (ns=0x8848d50)
    at /home/ig25/gcc/trunk/gcc/fortran/trans-decl.c:3217

...


-- 
           Summary: segfault with transpose(reshape(char))
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tkoenig at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31258


             reply	other threads:[~2007-03-18 22:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-18 22:28 tkoenig at gcc dot gnu dot org [this message]
2007-03-21  0:01 ` [Bug fortran/31258] " fxcoudert at gcc dot gnu dot org
2007-04-08  8:40 ` pault at gcc dot gnu dot org
2007-05-27  9:04 ` tkoenig at gcc dot gnu dot org
2007-05-27  9:06 ` tkoenig at gcc dot gnu dot org
2007-05-27 10:28 ` tkoenig at gcc dot gnu dot org
2007-06-11 12:54 ` pault at gcc dot gnu dot org
2007-08-30 22:11 ` pault at gcc dot gnu dot org
2007-08-30 22:14 ` pault 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=bug-31258-10391@http.gcc.gnu.org/bugzilla/ \
    --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).