make bootstrap segfaults on current cvs head (i686-pc-linux-gnu)

Joseph S. Myers jsm28@cam.ac.uk
Fri Oct 13 15:59:00 GMT 2000


On Fri, 13 Oct 2000, Alan Modra wrote:

> On Fri, 13 Oct 2000, Mike Coleman wrote:
> 
> > I get a segfault when trying to build gcc from the current cvs head.  I tried
> 
> So do I.  This might help.
> 
> gcc/ChangeLog
> * emit_rtl.c (init_emit_once): Create const_int_htab before using.

I think there's more to the problem than this.  gen_rtx_CONST_INT is at
this point only called with values that shouldn't go to const_int_htab -
arg == 0 at the crash.  It seems that

  if (arg >= - MAX_SAVED_CONST_INT && arg <= MAX_SAVED_CONST_INT)
    return const_int_rtx[arg + MAX_SAVED_CONST_INT];

(emit-rtl.c lines 242-3) is getting miscompiled.  (Note that the stage1
compiler manages to build a stage2 compiler, but the stage2 compiler
crashes as soon as it is used.)

Could the following change be relevant?  (Not tested before/after, but it
seems the most plausible.)

Thu Oct 12 16:02:31 MET DST 2000 Jan Hubicka  <jh@suse.cz>

        * i386.md (adddi3, subdi3 splitters): Update for new pattern.
        (addsi3_cc, addqi3_cc, subsi3_cc): Remove
        (addsi3_carry): Canonicalize.
        (addqi_5): Remove '*'.
        (sbb pattern): Canonicalize.

        * i386.md (cmp to inc/add peep2): New.

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Gcc-bugs mailing list