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.