Commit efec771a by Richard Henderson Committed by Richard Henderson

re PR debug/50006 (ICE in in connect_traces, at dwarf2cfi.c:2677)

PR middle-end/50006
        * explow.c (allocate_dynamic_stack_space): Move suppress_reg_args_size
        setting out to include allocate_stack named pattern as well.
        * builtins.c (expand_builtin_apply): Add ARG_SIZE 0 note.
        * stmt.c (expand_stack_restore): Likewise.

From-SVN: r177764
parent 6ea91222
2011-08-15 Richard Henderson <rth@redhat.com>
PR middle-end/50006
* explow.c (allocate_dynamic_stack_space): Move suppress_reg_args_size
setting out to include allocate_stack named pattern as well.
* builtins.c (expand_builtin_apply): Add ARG_SIZE 0 note.
* stmt.c (expand_stack_restore): Likewise.
2011-08-15 Richard Guenther <rguenther@suse.de> 2011-08-15 Richard Guenther <rguenther@suse.de>
PR middle-end/50082 PR middle-end/50082
......
...@@ -1680,6 +1680,7 @@ expand_builtin_apply (rtx function, rtx arguments, rtx argsize) ...@@ -1680,6 +1680,7 @@ expand_builtin_apply (rtx function, rtx arguments, rtx argsize)
else else
#endif #endif
emit_stack_restore (SAVE_BLOCK, old_stack_level); emit_stack_restore (SAVE_BLOCK, old_stack_level);
fixup_args_size_notes (call_insn, get_last_insn(), 0);
OK_DEFER_POP; OK_DEFER_POP;
......
...@@ -1375,6 +1375,9 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align, ...@@ -1375,6 +1375,9 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align,
else if (flag_stack_check == STATIC_BUILTIN_STACK_CHECK) else if (flag_stack_check == STATIC_BUILTIN_STACK_CHECK)
probe_stack_range (STACK_CHECK_PROTECT, size); probe_stack_range (STACK_CHECK_PROTECT, size);
/* Don't let anti_adjust_stack emit notes. */
suppress_reg_args_size = true;
/* Perform the required allocation from the stack. Some systems do /* Perform the required allocation from the stack. Some systems do
this differently than simply incrementing/decrementing from the this differently than simply incrementing/decrementing from the
stack pointer, such as acquiring the space by calling malloc(). */ stack pointer, such as acquiring the space by calling malloc(). */
...@@ -1425,7 +1428,6 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align, ...@@ -1425,7 +1428,6 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align,
} }
saved_stack_pointer_delta = stack_pointer_delta; saved_stack_pointer_delta = stack_pointer_delta;
suppress_reg_args_size = true;
if (flag_stack_check && STACK_CHECK_MOVING_SP) if (flag_stack_check && STACK_CHECK_MOVING_SP)
anti_adjust_stack_and_probe (size, false); anti_adjust_stack_and_probe (size, false);
...@@ -1436,13 +1438,14 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align, ...@@ -1436,13 +1438,14 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align,
The constant size alloca should preserve The constant size alloca should preserve
crtl->preferred_stack_boundary alignment. */ crtl->preferred_stack_boundary alignment. */
stack_pointer_delta = saved_stack_pointer_delta; stack_pointer_delta = saved_stack_pointer_delta;
suppress_reg_args_size = false;
#ifdef STACK_GROWS_DOWNWARD #ifdef STACK_GROWS_DOWNWARD
emit_move_insn (target, virtual_stack_dynamic_rtx); emit_move_insn (target, virtual_stack_dynamic_rtx);
#endif #endif
} }
suppress_reg_args_size = false;
/* Finish up the split stack handling. */ /* Finish up the split stack handling. */
if (final_label != NULL_RTX) if (final_label != NULL_RTX)
{ {
......
...@@ -2016,10 +2016,13 @@ expand_stack_save (void) ...@@ -2016,10 +2016,13 @@ expand_stack_save (void)
void void
expand_stack_restore (tree var) expand_stack_restore (tree var)
{ {
rtx sa = expand_normal (var); rtx prev, sa = expand_normal (var);
sa = convert_memory_address (Pmode, sa); sa = convert_memory_address (Pmode, sa);
prev = get_last_insn ();
emit_stack_restore (SAVE_BLOCK, sa); emit_stack_restore (SAVE_BLOCK, sa);
fixup_args_size_notes (prev, get_last_insn (), 0);
} }
/* Do the insertion of a case label into case_list. The labels are /* Do the insertion of a case label into case_list. The labels are
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment