http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49430
janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011.06.21 20:21:29 Ever Confirmed|0 |1 --- Comment #3 from janus at gcc dot gnu.org 2011-06-21 20:21:29 UTC --- (In reply to comment #1) > I wonder whether the > 3538 type = gfc_get_character_type (ts.kind, ts.u.cl); > should be rather: > type = gfc_get_character_type (ts.kind, ts->deferred ? NULL_TREE : > ts.u.cl); Well, with this: Index: gcc/fortran/trans-expr.c =================================================================== --- gcc/fortran/trans-expr.c (revision 175256) +++ gcc/fortran/trans-expr.c (working copy) @@ -3535,7 +3535,8 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * else if (ts.type == BT_CHARACTER) { /* Pass the string length. */ - type = gfc_get_character_type (ts.kind, ts.u.cl); + type = gfc_get_character_type (ts.kind, + ts.deferred ? NULL_TREE : ts.u.cl); type = build_pointer_type (type); /* Return an address to a char[0:len-1]* temporary for I run into another segfault: #0 0x0000000000575a6d in gfc_evaluate_now_loc (loc=2308, expr=0x0, pblock=0x7fffffffd560) at /home/jweil/gcc47/trunk/gcc/fortran/trans.c:126 #1 0x0000000000575b40 in gfc_evaluate_now (expr=0x0, pblock=0x7fffffffd560) at /home/jweil/gcc47/trunk/gcc/fortran/trans.c:139 #2 0x00000000005ca23b in gfc_trans_assignment_1 (expr1=0x1af3df0, expr2=0x1af3eb0, init_flag=0 '\000', dealloc=1 '\001') at /home/jweil/gcc47/trunk/gcc/fortran/trans-expr.c:6117