This is the mail archive of the
mailing list for the GCC project.
Re: GCC with formal testing docs
On Wed, 2007-07-25 at 07:05 -0400, Robert Dewar 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.
> If it gave anyone a shock to find out that the test suite did not
> provide 100% coverage, then that person is not very familiar with
> compiler technology. It is by no means SOP to try to get 100%
I guess I should have been more specific. The point I was trying to
make is that the GCC testsuite was never intended to be a coverage
testsuite. It is primarily a regression testsuite.
I have run the testsuite under an instrumented compiler and, if I
recall, the coverage averaged over all the files was about 40%.
> coverage testing of a compiler, and in practice for many reasons,
> very difficult (compilers often contain a lot of deactivated code
> that comes from defensive programming against errors, since
> compilers more than many programs routinely expect to be fed
> rubbish, and work hard to behave nicely when mistreated in
> this way :-)
If you're determined enough, it is possible to test all of that code,