[Fwd: CVS trunk bootstrap failure on alphaev6-unknown-linux-gnu]

Toon Moene toon@moene.indiv.nluug.nl
Fri Jul 6 14:15:00 GMT 2001


Joern,

You created the reload_cse_move2add function in reload1.c - on the 24th
of September 1998.

Could you comment on my analysis below ?

TIA,

[ Note - the ICE doesn't happen with the latest CVS head, because Jeff
  modified the ssa-dce.c function that caused the crash.  The problem
  is still there, I believe ]

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)


To : gcc-bugs at gcc dot gnu dot org
Subject : Re: CVS trunk bootstrap failure on alphaev6-unknown-linux-gnu
>From : Toon Moene <toon at moene dot indiv dot nluug dot nl>
Date : Sat, 30 Jun 2001 19:39:07 +0200
Organization : Moene Computational Physics, Maartensdijk, The Netherlands
References : <3B3CE7DE.F636FA98@moene.indiv.nluug.nl>

Toon Moene wrote:

> stage1/xgcc -Bstage1/ -B/usr/snp/alphaev6-unknown-linux-gnu/bin/ -c
> -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long
> -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/.
> -I../../gcc/gcc/config -I../../gcc/gcc/../include
> ../../gcc/gcc/ssa-dce.c -o ssa-dce.o
> ../../gcc/gcc/ssa-dce.c: In function `note_inherently_necessary_set':
> ../../gcc/gcc/ssa-dce.c:340: warning: unused parameter `set'
> ../../gcc/gcc/ssa-dce.c: In function `find_inherently_necessary':
> ../../gcc/gcc/ssa-dce.c:367: warning: unused variable `pattern'
> ../../gcc/gcc/ssa-dce.c: In function `eliminate_dead_code':
> ../../gcc/gcc/ssa-dce.c:683: Internal compiler error in gen_add2_insn,
> at optabs.c:3762
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.

This piece of code aborts:

/* Generate and return an insn body to add Y to X.  */

rtx                                                               
gen_add2_insn (x, y)
     rtx x, y;
{
  int icode = (int) add_optab->handlers[(int) GET_MODE (x)].insn_code;

  if (!
((*insn_data[icode].operand[0].predicate)                           
         (x, insn_data[icode].operand[0].mode))
      || ! ((*insn_data[icode].operand[1].predicate)
            (x, insn_data[icode].operand[1].mode))
      || ! ((*insn_data[icode].operand[2].predicate)
            (y, insn_data[icode].operand[2].mode)))
    abort ();

It aborts because it's called with a (const_int 65535 [0xffff]) as y
value, which doesn't have a mode.

So either this sanity check is to restrictive, or the calling code at
reload1.c:9220 is wrong:

        rtx new_src = GEN_INT (sext_for_mode (GET_MODE (reg),
                                              added_offset   
                                              + base_offset
                                              - regno_offset));
        int success = 0;

        if (new_src == const0_rtx)
          /* See above why we create (set (reg) (reg)) here.  */
          success
             = validate_change (next, &SET_SRC (set), reg, 0);
        else if ((rtx_cost (new_src, PLUS)
                  < COSTS_N_INSNS (1) + rtx_cost (src3, SET))
                  && have_add2_insn (GET_MODE (reg)))
          success
              = validate_change (next, &PATTERN (next),
                                 gen_add2_insn (reg, new_src), 0);

Note that this code *implies* that new_src (the `y' argument above) is a
CONST_INT.

who knows what's right, here ?

TIA,

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)



More information about the Gcc-bugs mailing list