This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC with formal testing docs
Rask Ingemann Lambertsen <rask@sygehus.dk> writes:
> On Wed, Jul 25, 2007 at 02:29:26PM +1000, Ben Elliston wrote:
> >
> > If you build the compiler with coverage instrumentation and run the
> > testsuite, you might get a shock. It's not as well tested as you might
> > think.
>
> 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.
Ian