This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/46095] [4.6 Regression] ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 15 Nov 2010 17:30:27 +0000
- Subject: [Bug debug/46095] [4.6 Regression] ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector
- Auto-submitted: auto-generated
- References: <bug-46095-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46095
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-15 17:28:45 UTC ---
Created attachment 22402
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22402
gcc46-pr46095.patch
Untested fix.
The problem why the current code doesn't work is that scheduling swaps
the movq %rsp, %rbp and movabsq $......, %r11 insns. When they are swapped,
it doesn't help that the %r11 setting insn is marked as frame related, it sets
cfa_temp, but the next insn (movq %rsp, %rbp) clobbers cfa_temp and thus when
on the following addq %r11, %rsp insn we'd like to be able to look up the
offset
loaded into r11, cfa_temp no longer describes it and thus we ICE.
Before Richard's patch the insn was using a const_int in the addition instead
and had additional USE on r11 register. I'd say the easiest fix is just to
describe what the insn actually does in REG_FRAME_RELATED_EXPR, as done in this
patch. Then what value is loaded into r11 is uninteresting.