------- Comment #3 from vmakarov at redhat dot com 2008-09-09 22:14 ------- The bug occurs in eliminate_regs_in_insn because it is a first place where insn generated in caller-save.c is checked. Caller-save.c tries to save register in its mode SD but there is no insn for this. Functions insert_save/insert_restore tries to use correct mode to save/restore hard register
(mem/c:SI (plus:SI (reg/f:SI 20 frame) (const_int -4 [0xfffffffffffffffc])) [5 S4 A32]) But it is changed by the following code if (save_mode [regno] != VOIDmode && save_mode [regno] != GET_MODE (mem) && numregs == (unsigned int) hard_regno_nregs[regno][save_mode [regno]]) mem = adjust_address (mem, save_mode[regno], 0); else mem = copy_rtx (mem); into (mem/c:SD (plus:SI (reg/f:SI 20 frame) (const_int -4 [0xfffffffffffffffc])) [5 S4 A32]) Additional check of generated insn correctness in the if-stmt reg_save_code (regno, save_mode[regno]) >= 0 would solve the problem I'll submit a patch soon. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37435