Bug 26725 - [4.2 Regression] ICE in check_reg_live, at haifa-sched.c:4645 with -O2 on ia64
Summary: [4.2 Regression] ICE in check_reg_live, at haifa-sched.c:4645 with -O2 on ia64
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: 4.2.0
Assignee: Richard Sandiford
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2006-03-17 10:37 UTC by Grigory Zagorodnev
Modified: 2006-04-25 21:36 UTC (History)
2 users (show)

See Also:
Host:
Target: ia64-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-03-30 15:11:46


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grigory Zagorodnev 2006-03-17 10:37:43 UTC
GCC 4.2 revision 112135 failed to compile SPEC cpu2000/197.parser.
Here is the minimal reproducer:

struct Exp_struct {
    char type;
    unsigned char cost;
};
extern void foo();
void print_expression(struct Exp_struct * n)
{
  int i;
  if (n->type == 2)
  {
    for (i=0; i<n->cost; i++) foo();
    foo();
  } else {
    for (i=0; i<n->cost; i++) foo();
    if (n->cost == 0) foo();
  }
}

$ gcc-42 -c -O2 par.c                                          
par.c: In function 'print_expression':
par.c:17: internal compiler error: in check_reg_live, at haifa-sched.c:4645
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Andrew Pinski 2006-03-22 04:16:48 UTC
Confirmed,
the patch which was submitted was here:
http://gcc.gnu.org/ml/gcc-patches/2006-03/msg01127.html

Comment 2 Martin Michlmayr 2006-04-17 18:29:21 UTC
What's the status of this bug?  Did nobody comment on the proposed patch?
Comment 3 Martin Michlmayr 2006-04-21 15:49:55 UTC
This is a very common bug (seen when compiling the Debian archive).  Please set priority to P1.
Comment 4 Martin Michlmayr 2006-04-24 08:29:02 UTC
Richard, what's the status of your patch?
Comment 5 Richard Sandiford 2006-04-25 21:34:55 UTC
Subject: Bug 26725

Author: rsandifo
Date: Tue Apr 25 21:34:48 2006
New Revision: 113257

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113257
Log:
gcc/
	PR rtl-optimization/26725
	* cfgrtl.c (rtl_redirect_edge_and_branch_force): Set the source
	block's BB_DIRTY flag.

gcc/testsuite/
	* gcc.c-torture/compile/pr26725.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr26725.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cfgrtl.c
    trunk/gcc/testsuite/ChangeLog

Comment 6 Richard Sandiford 2006-04-25 21:36:40 UTC
Patch applied to trunk.