ICE: While compiling cp/lex.c for alpha 32.

Jeffrey A Law law@cygnus.com
Fri Apr 30 22:47:00 GMT 1999


  In message < 3714D17E.D584B041@interix.com >you write:
  > ICE: While compiling cp/lex.c for alpha 32.
  > 
  > Problem:
  > 
  > The test program below (extracted from cp/lex.c) causes the abort()
  > at the beginning of gen_reg_rtx to trigger (stack trace below).
  > The reason is that in cse.c, the current code is a bit too cavalier
  > about types when it's folding a jump table for a known offset.  It
  > generates a truncate if the object involved is not Pmode.  Subseqently,
  > the truncate requires that a new pseudo be generated after that's
  > no longer allowed.  Doing the MINUS in ptr_mode causes the same
  > problem.  (When ptr_mode != Pmode).
  > 
  > The subsequent comment indicates that the pseudo-constant that
  > is created is not supposed to live very long, and it seems that it
  > is living further than it should when the mode is not correct.
  > The following (illegal, I think) rtl (taken from the case 
  > where the MINUS is done in ptr_mode)
  > 
  >    (const:SI (minus:SI (label_ref:DI 48)
  > 	   (label_ref:DI 43)))
  > 
  > doesn't appear to survive in any form when everything is in Pmode.
  > 
  > In the case of retaining the lines deleted below, it looks something
  > like:
  >    (const:SI (truncate:SI (minus:DI (label_ref:DI 48)
  > 	   (label_ref:DI 43))))
  > which is exactly what you'd expect from the source code.
  > 
  > This change should have no effect on architectures where Pmode == ptr_mode.
  > (*And...)
  > 
  > Fix: 
  > 
  > Fri Feb 19 22:27:02 1999  Donn Terry (donn@interix.com)
  > 	* cse.c(fold_rtx):  Don't generate extra truncate insn
  > 	when folding jump table entries.
I think this needs to be caught earlier instead of simply removing the code
that is giving you problems.  That code is there for a reason, removing it
is not the right thing to do.

jeff



More information about the Gcc-patches mailing list