[gfortran] Fix result pointer variables
Paul Brook
paul@nowt.org
Sat Oct 11 20:30:00 GMT 2003
Patch below fixes a failure with function result varables with the pointer
attribute.
Paul
2003-10-11 Feng Wang <wf_cs@yahoo.com>
* trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
diff -uprxCVS clean/tree-ssa/gcc/fortran/trans-expr.c gcc/gcc/fortran/
trans-expr.c
--- clean/tree-ssa/gcc/fortran/trans-expr.c +0100
+++ gcc/gcc/fortran/trans-expr.c
@@ -302,7 +302,7 @@ gfc_conv_variable (gfc_se * se, gfc_expr
|| sym->attr.result
|| sym->attr.function
|| !sym->attr.dimension)
- && !GFC_DECL_STRING (se->expr))
+ && sym->ts.type != BT_CHARACTER)
{
se->expr = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (se->expr)),
se->expr);
More information about the Fortran
mailing list