This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/48016] Inconsistency in non-local goto save area
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 16 Mar 2011 16:40:35 +0000
- Subject: [Bug middle-end/48016] Inconsistency in non-local goto save area
- Auto-submitted: auto-generated
- References: <bug-48016-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48016
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2011-03-16 16:40:31 UTC ---
Another problem. expand_function_start has
t_save = build4 (ARRAY_REF, ptr_type_node,
cfun->nonlocal_goto_save_area,
integer_zero_node, NULL_TREE, NULL_TREE);
r_save = expand_expr (t_save, NULL_RTX, VOIDmode, EXPAND_WRITE);
r_save = convert_memory_address (Pmode, r_save);
emit_move_insn (r_save, targetm.builtin_setjmp_frame_value ());
For
Breakpoint 4, expand_function_start (subr=0x7ffff0cebf00)
at /export/gnu/import/git/gcc-x32/gcc/function.c:4765
4765 r_save = convert_memory_address (Pmode, r_save);
(gdb) call debug_rtx (r_save)
(mem/s/f/j/c:SI (plus:DI (reg/f:DI 54 virtual-stack-vars)
(const_int -32 [0xffffffffffffffe0])) [0 FRAME.0.__nl_goto_buf+0 S4
A64])
(gdb) next
4767 emit_move_insn (r_save, targetm.builtin_setjmp_frame_value ());
(gdb) call debug_rtx (r_save)
(reg:DI 61)
(gdb)
we generate
(insn 3 2 4 2 (set (reg:DI 61)
(zero_extend:DI (mem/s/f/j/c:SI (plus:DI (reg/f:DI 54
virtual-stack-vars)
(const_int -32 [0xffffffffffffffe0])) [0
FRAME.0.__nl_goto_buf+0 S4 A64]))) x.c:2 -1
(nil))
(insn 4 3 5 2 (set (reg:DI 61)
(reg/f:DI 54 virtual-stack-vars)) x.c:2 -1
(nil))
Instead of
(insn 3 2 4 2 (set (mem/s/f/j/c:SI (plus:DI (reg/f:DI 54 virtual-stack-vars)
(const_int -32 [0xffffffffffffffe0])) [0
FRAME.0.__nl_goto_buf+0 S8 A64])
((subreg:SI reg/f:DI 54 virtual-stack-vars)) x.c:2 -1
(nil))