Commit 714495cd by Jakub Jelinek Committed by Jakub Jelinek

re PR fortran/24790 (arguments are displayed as reference or pointer to normal type in GDB)

	PR fortran/24790
	* trans-decl.c (create_function_arglist): Set DECL_BY_REFERENCE on
	PARM_DECLs with pointer or reference type.

From-SVN: r139777
parent 2599ed92
2008-08-29 Jakub Jelinek <jakub@redhat.com> 2008-08-29 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.
* trans-decl.c (gfc_build_qualified_array): Build non-flat * trans-decl.c (gfc_build_qualified_array): Build non-flat
array type for debug info purposes. array type for debug info purposes.
......
...@@ -1644,6 +1644,10 @@ create_function_arglist (gfc_symbol * sym) ...@@ -1644,6 +1644,10 @@ create_function_arglist (gfc_symbol * sym)
DECL_ARG_TYPE (parm) = TREE_VALUE (typelist); DECL_ARG_TYPE (parm) = TREE_VALUE (typelist);
/* All implementation args are read-only. */ /* All implementation args are read-only. */
TREE_READONLY (parm) = 1; 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); gfc_finish_decl (parm);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment