This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gfortran] Fix result pointer variables


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]