Bug 32747 - [4.3 Regression] ICE segmentation fault or abort in combine on alpha
Summary: [4.3 Regression] ICE segmentation fault or abort in combine on alpha
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build, ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2007-07-12 23:10 UTC by Serge Belyshev
Modified: 2007-07-26 09:23 UTC (History)
3 users (show)

See Also:
Host:
Target: alpha-unknown-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-07-16 15:52:59


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Serge Belyshev 2007-07-12 23:10:41 UTC
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.
Comment 1 Serge Belyshev 2007-07-13 08:26:27 UTC
Broken by r126517:

2007-07-10  Ian Lance Taylor  <iant@google.com>

        Replace no_new_pseudos in backends.
        ...
Comment 2 Andrew Pinski 2007-07-15 21:01:49 UTC
This seems related to:
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg01379.html
Comment 3 Ian Lance Taylor 2007-07-16 15:52:59 UTC
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.
Comment 4 Serge Belyshev 2007-07-26 09:23:27 UTC
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.