Testcase is as simple as this, compile with -O2 (can be triggered in a cross compiler): void foo (unsigned u) { if (u != 0x34303365) bar (); } Result may vary, either segfault in get_last_value_validate(), or ICE in copy_rtx, at rtl.c:314, or abort() in libc after free, depending on how compiler is invoked (from gdb or not), amount of enabled checking and host machine.
Broken by r126517: 2007-07-10 Ian Lance Taylor <iant@google.com> Replace no_new_pseudos in backends. ...
This seems related to: http://gcc.gnu.org/ml/gcc-patches/2007-07/msg01379.html
The problem is that the reg_stat array in combine.c does not adjust when splitters create new pseudo-registers. I'm working on a patch to convert reg_stat to a VEC.
Fixed by: http://gcc.gnu.org/viewcvs?view=rev&revision=126942 r126942 | ian | 2007-07-26 04:27:34 +0400 (Thu, 26 Jul 2007) | 7 lines * combine.c (combine_max_regno): Remove. Remove all uses. (struct reg_stat_struct): Rename from struct reg_stat. (reg_stat_type): Define, and declare VECs. (reg_stat): Change from pointer to VEC. Change all uses. (combine_split_insns): New static function. (try_combine, find_split_point): Call it instead of split_insns.