GCC trunk gets an internal compiler error when building SPEC CPU2000 test
186.crafty with "-O2 -fselective-scheduling -fsel-sched-pipelining
-fsel-sched-pipelining-outer-loops" on powerpc-linux, as demonstrated by this
minimized testcase:

-----------------------------------------------------------------
typedef enum
{
  empty = 0, pawn = 1, knight = 2, king = 3, bishop = 5, rook = 6, queen = 7
}
PIECE;
extern int p_values[15];
extern int *last[65];
int
Quiesce (int alpha, int beta, int wtm, int ply)
{
  register int initial_alpha, value, delta;
  register int *goodmv, *movep, moves = 0, *sortv, temp;
  for (movep = last[ply - 1]; movep < last[ply]; movep++)
    if (p_values[(((*movep) >> 15) & 7) + 7] +
        p_values[(((*movep) >> 18) & 7) + 7] >= delta)
      {
        register int done;
        register int *end = last[ply - 1] + moves - 1;
        do
          {
            done = 1;
            movep = last[ply - 1];
            for (; movep < end; movep++, sortv++)
              if (*sortv < *(sortv + 1))
                {
                  *(movep + 1) = temp;
                  done = 0;
                }
          }
        while (!done);
      }
}
-----------------------------------------------------------------

elm3b149% /home/janis/tools/gcc-trunk-anonsvn/bin/gcc -O2
-fselective-scheduling -fsel-sched-pipelining
-fsel-sched-pipelining-outer-loops -c bug.c
bug.c: In function ‘Quiesce’:
bug.c:32:1: internal compiler error: in init_seqno, at sel-sched.c:6722
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

The failure started with this large patch:

    http://gcc.gnu.org/viewcvs?view=rev&rev=145494

    r145494 | rguenth | 2009-04-03 10:24:28 +0000 (Fri, 03 Apr 2009)


-- 
           Summary: ICE in init_seqno for 186.crafty with sel-sched
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: janis at gcc dot gnu dot org
GCC target triplet: powerpc-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42246

Reply via email to