GCC with formal testing docs

Rask Ingemann Lambertsen rask@sygehus.dk
Fri Jul 27 16:50:00 GMT 2007

On Thu, Jul 26, 2007 at 12:36:19PM -0700, Ian Lance Taylor wrote:
> Rask Ingemann Lambertsen <rask@sygehus.dk> writes:
> >    For example, several targets would build/bootstrap and regtest fine with
> > reload's find_valid_class() implemented as gcc_abort(). And guess what,
> > there seems to be an off-by-one error in the outer loop exit condition.
> I think it is correct.  According to the documentation in tm.texi,
> N_REG_CLASSES should always be one larger than the last valid register
> class.  tm.texi does not require that NO_REGS == 0, so the loop is
> arguably wrong in that way.  In practice all machine descriptions do
> define NO_REGS to be 0, and that should probably be documented as a
> requirement.

   My bad, I'm misremebering something here. I think that loop is fine. But
the fact remanins that find_valid_class() doesn't get much, if any, testing.
I had a few lines of code in it to log arguments and return value to a file,
and the last time I check, only powerpc-unknown-eabispe ever produced any

   (The reason I put in the logging in the first place was that my 16-bit
x86 port was tripping the assertions in find_valid_class(). But something
changed enough that it isn't even called any more.)

Rask Ingemann Lambertsen

More information about the Gcc mailing list