This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Fix middle-end/25505
- From: Josh Conner <jconner at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, jason at redhat dot com, richard dot guenther at gmail dot com
- Date: Thu, 14 Sep 2006 11:30:45 -0700
- Subject: PATCH: Fix middle-end/25505
- References: <44EF948E.9010000@apple.com> <84fc9c000608260033v3f90a0ddg811c891afcc97526@mail.gmail.com> <10608260940.AA19284@vlsi1.ultra.nyu.edu> <84fc9c000608260248x39f79e49h99fbea3d95a2d151@mail.gmail.com> <10608261003.AA19387@vlsi1.ultra.nyu.edu> <44F32FAC.8040201@apple.com> <10608312235.AA10712@vlsi1.ultra.nyu.edu> <45019844.2000501@apple.com> <10609091245.AA03662@vlsi1.ultra.nyu.edu> <45058A26.4090803@apple.com>
Josh Conner wrote:
> Richard Kenner wrote:
>
>>> Note that since Jason's recent change to the frontend here:
>>>
>>> http://gcc.gnu.org/ml/gcc-patches/2006-09/msg00202.html
>>>
>>> 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 <jconner@apple.com>
PR middle-end/25505
* calls.c (expand_call): Allow reuse of structure return stack
temp.
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);