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