------- Additional Comments From paulthomas2 at wanadoo dot fr 2005-05-09 16:08 ------- Subject: Re: Pointers not passed as subroutine arguments
The following fixes PR16939 and regtests. I'll do a full synchronisatio, bootstrap and regtest before posting it on the lists: Best regards Paul Index: trans-expr.c =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/fortran/trans-expr.c,v retrieving revision 1.42 diff -p -c -3 -r1.42 trans-expr.c *** trans-expr.c 29 Apr 2005 15:31:33 -0000 1.42 --- trans-expr.c 9 May 2005 14:41:23 -0000 *************** gfc_conv_variable (gfc_se * se, gfc_expr *** 360,365 **** --- 360,372 ---- if (sym->attr.dummy && sym->ts.type != BT_CHARACTER && !sym->attr.dimension) + se->expr = gfc_build_indirect_ref (se->expr); + + /*Dereference dummy args that are character pointers. */ + if (sym->attr.dummy + && sym->attr.pointer + && sym->ts.type == BT_CHARACTER + && !sym->attr.dimension) se->expr = gfc_build_indirect_ref (se->expr); /* Dereference pointer variables. */ -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16939