This is the mail archive of the 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 middle-end/25505

Josh Conner wrote:
> Richard Kenner wrote:
>>> Note that since Jason's recent change to the frontend here:
>>> This change would be sufficient to address the remaining issues in
>>> pr25505.  I'd like to hear your opinion of this, though, before
>>> submitting it for approval.
>> Does "it" mean what's below (i.e., removing "keep")?
> Yes.
>> If so, my feeling would
>> be to agree with you that it seems redundant and hence not needed, but I'd
>> also fear introducing bugs here.  At a minimum, I'd suggest running a full
>> test on Sparc (which is where these bugs will show up most often due to its
>> calling convention) if you can.

Here's what I ran:

  sparc-sun-solaris2.9 (c, c++)
  powerpc-apple-darwin8.6.0 (all default languages)
  i686-pc-linux-gnu (all default languages)
  mips-none-elf (c, c++)

With no regressions.

OK for mainline?

- Josh

2006-09-14  Josh Conner  <>

	PR middle-end/25505
	* calls.c (expand_call): Allow reuse of structure return stack

Index: gcc/calls.c
--- gcc/calls.c	(revision 117877)
+++ gcc/calls.c	(working copy)
@@ -1985,7 +1985,7 @@
 	    /* For variable-sized objects, we must be called with a target
 	       specified.  If we were to allocate space on the stack here,
 	       we would have no way of knowing when to free it.  */
-	    rtx d = assign_temp (TREE_TYPE (exp), 1, 1, 1);
+	    rtx d = assign_temp (TREE_TYPE (exp), 0, 1, 1);
 	    mark_temp_addr_taken (d);
 	    structure_value_addr = XEXP (d, 0);

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