PLEASE REPLY TO [EMAIL PROTECTED] ONLY, *NOT* [EMAIL PROTECTED] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11052
------- Additional Comments From [EMAIL PROTECTED] 2003-06-02 17:09 ------- Subject: Re: [3.3 regression] [arm] ICE (segfault) compiling xfree86 Bizzare. Your analysis does not match mine at all (though I am getting a segfault). Firstly, I get this on arm-elf as well as on arm-linux (but not if I have -mcpu=strongarm on the options list). What I am seeing happening is that we have the construct int quarks[100 + 1]; register int num_quarks; num_quarks = 0; for(;;) { quarks[num_quarks++] = something; } And this is being transformed into (roughly): int quarks[100 + 1]; int *q_ptr = quarks; for (;;) { *q_ptr++ = something; } Or, in rtl: (insn 193 23 30 0 (nil) (set (reg/v/f:SI 39) (reg/f:SI 73)) 175 {*arm_movsi_insn} (insn_list 23 (nil)) (expr_list:REG_EQUAL (plus:SI (reg/f:SI 25 sfp) (const_int -9000 [0xffffdcd8])) (nil))) ... (insn 94 162 95 6 0x4001d7bc (set (mem:SI (pre_inc:SI (reg/v/f:SI 39)) [8 S4 A32 ]) (reg:SI 54)) 175 {*arm_movsi_insn} (nil) (expr_list:REG_INC (reg/v/f:SI 39) (expr_list:REG_DEAD (reg:SI 54) (nil)))) Now during local register allocation that REG_EQUAL note on insn 193 is being transformed into a REQ_EQUIV (which implies that 39 never changes). So when reload fails to allocate a register to reg 39 it simply substitues in the equiv expression. That leaves us with a post_inc of something that isn't a register and has no stack equivalent. (insn:HI 211 210 103 5 0x401d52ec (set (mem:SI (pre_inc:SI (plus:SI (reg/f:SI 11 fp) (const_int -9040 [0xffffdcb0]))) [8 S4 A32]) (reg:SI 3 r3 [93])) 124 {*arm_movsi_insn} (insn_list 210 (nil)) (expr_list:REG_DEAD (reg:SI 3 r3 [93]) (expr_list:REG_INC (plus:SI (reg/f:SI 11 fp) (const_int -9040 [0xffffdcb0])) (nil)))) We then get confused in a later pass when we try to kill an auto-inc value because an auto-inc should never apply to anything other than a register. I need to look into this further, but it appears that REG_N_SETS hasn't taken into account the auto_inc operation ;-( R. ------- You are receiving this mail because: ------- You reported the bug, or are watching the reporter.