mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-11 06:04:33 +08:00
re PR middle-end/28493 (Wrong address of stack object used for destructor call on PPC)
PR middle-end/28493 * builtins.c (expand_builtin_setjmp_receiver): Clobber hard_frame_pointer_rtx after using it to update the frame pointer. From-SVN: r116900
This commit is contained in:
parent
c1a03f0311
commit
f01194138c
@ -1,3 +1,9 @@
|
||||
2006-09-12 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR middle-end/28493
|
||||
* builtins.c (expand_builtin_setjmp_receiver): Clobber
|
||||
hard_frame_pointer_rtx after using it to update the frame pointer.
|
||||
|
||||
2006-09-12 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
* target-def.h (TARGET_ASM_OPEN_PAREN): Guard with an #ifndef.
|
||||
|
@ -679,7 +679,12 @@ expand_builtin_setjmp_receiver (rtx receiver_label ATTRIBUTE_UNUSED)
|
||||
#ifdef HAVE_nonlocal_goto
|
||||
if (! HAVE_nonlocal_goto)
|
||||
#endif
|
||||
emit_move_insn (virtual_stack_vars_rtx, hard_frame_pointer_rtx);
|
||||
{
|
||||
emit_move_insn (virtual_stack_vars_rtx, hard_frame_pointer_rtx);
|
||||
/* This might change the hard frame pointer in ways that aren't
|
||||
apparent to early optimization passes, so force a clobber. */
|
||||
emit_insn (gen_rtx_CLOBBER (VOIDmode, hard_frame_pointer_rtx));
|
||||
}
|
||||
|
||||
#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
|
||||
if (fixed_regs[ARG_POINTER_REGNUM])
|
||||
|
25
gcc/testsuite/g++.dg/eh/unwind1.C
Normal file
25
gcc/testsuite/g++.dg/eh/unwind1.C
Normal file
@ -0,0 +1,25 @@
|
||||
// PR middle-end/28493
|
||||
|
||||
extern "C" void abort ();
|
||||
|
||||
struct Command *ptr;
|
||||
|
||||
struct Command {
|
||||
Command() { ptr = this; }
|
||||
virtual ~Command() { if (ptr != this) abort(); }
|
||||
};
|
||||
|
||||
void tryfunc()
|
||||
{
|
||||
Command cmd;
|
||||
throw 1;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
try
|
||||
{
|
||||
tryfunc();
|
||||
}
|
||||
catch (int) { }
|
||||
}
|
Loading…
Reference in New Issue
Block a user