[PATCH] Use DECL_BY_REFERENCE for Fortran dummy arguments (PR fortran/24790)
Jakub Jelinek
jakub@redhat.com
Fri Aug 22 16:56:00 GMT 2008
Hi!
This patch on top of the 2 DECL_BY_REFERENCE dwarf2out.c fixes I've sent
earlier today makes the dummy arguments appear in the debugger as having
their real types instead of being pointers or references to those types.
Ok for trunk?
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
@@ -1644,6 +1644,10 @@ 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.proc_pointer
+ && f->sym->attr.flavor != FL_PROCEDURE))
+ DECL_BY_REFERENCE (parm) = 1;
gfc_finish_decl (parm);
Jakub
More information about the Gcc-patches
mailing list