public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31258]  New: segfault with transpose(reshape(char))
@ 2007-03-18 22:28 tkoenig at gcc dot gnu dot org
  2007-03-21  0:01 ` [Bug fortran/31258] " fxcoudert at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2007-03-18 22:28 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-08-30 22:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-18 22:28 [Bug fortran/31258] New: segfault with transpose(reshape(char)) tkoenig at gcc dot gnu dot org
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

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).