[Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
hjl.tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jul 2 02:18:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66626
--- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> ---
ix86_static_chain_on_stack is incompatible with LRA since
1. nonlocal_goto generates:
lab = copy_to_reg (lab);
emit_clobber (gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (VOIDmode)));
emit_clobber (gen_rtx_MEM (BLKmode, hard_frame_pointer_rtx));
emit_move_insn (hard_frame_pointer_rtx, fp);
emit_stack_restore (SAVE_NONLOCAL, stack);
emit_use (hard_frame_pointer_rtx);
emit_use (stack_pointer_rtx);
emit_indirect_jump (lab);
2. ix86_static_chain_on_stack uses arg_pointer_rtx to store static
chain on stack.
3. LRA must use the hard fame pointer for elimination.
These simply won't work to together. Since we must keep LRA, we
should remove ix86_static_chain_on_stack.
More information about the Gcc-bugs
mailing list