gcc/gcc43-fortran-debug6.patch

18 lines
653 B
Diff
Raw Normal View History

2008-08-25 12:56:48 +00:00
2008-08-22 Jakub Jelinek <jakub@redhat.com>
PR fortran/24790
* trans-decl.c (create_function_arglist): Set DECL_BY_REFERENCE on
PARM_DECLs with pointer or reference type.
--- gcc/fortran/trans-decl.c.jj 2008-08-21 23:07:01.000000000 +0200
+++ gcc/fortran/trans-decl.c 2008-08-22 14:47:59.000000000 +0200
@@ -1588,6 +1588,8 @@ create_function_arglist (gfc_symbol * sy
DECL_ARG_TYPE (parm) = TREE_VALUE (typelist);
/* All implementation args are read-only. */
TREE_READONLY (parm) = 1;
+ if (POINTER_TYPE_P (type) && f->sym->attr.flavor != FL_PROCEDURE)
+ DECL_BY_REFERENCE (parm) = 1;
gfc_finish_decl (parm);