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]

[PATCH]: Fix PR c/12372


The enclosed patch fixes the problem of arguments being deleted in a sibcall
to a const function.  The change is simply to mark memory as used for
const calls as well as pure calls.

Tested with no regressions on hppa-unknown-linu-gnu, hppa2.0w-hp-hpux11.11
and hppa64-hp-hpux11.11 with no regressions.

Ok for main?

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2003-10-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	PR c/12372
	* calls.c (emit_call_1): Mark memory as used for a call to const
	function.

Index: calls.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/calls.c,v
retrieving revision 1.304
diff -u -3 -p -r1.304 calls.c
--- calls.c	7 Oct 2003 19:48:17 -0000	1.304
+++ calls.c	8 Oct 2003 20:56:23 -0000
@@ -482,8 +482,8 @@ emit_call_1 (rtx funexp, tree fndecl ATT
   /* Find the call we just emitted.  */
   call_insn = last_call_insn ();
 
-  /* Mark memory as used for "pure" function call.  */
-  if (ecf_flags & ECF_PURE)
+  /* Mark memory as used for a const function call.  */
+  if (ecf_flags & (ECF_CONST | ECF_PURE))
     call_fusage
       = gen_rtx_EXPR_LIST
 	(VOIDmode,


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