This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix middle-end/15054 (overlapping stack temporaries)
- From: Mike Stump <mrs at apple dot com>
- To: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 Apr 2004 16:32:28 -0700
- Subject: Re: [PATCH] Fix middle-end/15054 (overlapping stack temporaries)
On Thursday, April 29, 2004, at 06:36 AM, Ulrich Weigand wrote:
the following patch fixes PR middle-end/15054, a bug caused by
overlapping stack temporaries.
I see the problem. I don't like your patch, it gets the lifetime
wrong. Please just do this:
if (keep == 2)
{
p->level = target_temp_slot_level;
p->keep = 1;
}
instead of this:
if (keep == 2)
{
p->level = target_temp_slot_level;
p->keep = 0;
}
This keeps like lifetime as intended, and ensures that the space isn't
freed until popped. Obvious with that change to me.
target = assign_temp (type, 2, 0, 1);
/* All temp slots at this level must not conflict. */
preserve_temp_slots (target);
*************** expand_expr_real (tree exp, rtx target,
*** 8525,8532 ****
else
{
target = assign_temp (type, 2, 0, 1);
- /* All temp slots at this level must not conflict. */
- preserve_temp_slots (target);
This part is ok.