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. > On Wed, Jul 25, 2007 at 07:05:36AM -0400, Robert Dewar wrote: > 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% > 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 :-)
Right. However, some coverage-oriented methodologies explicitly mark code that is expected to be unreachable, and produce unit tests to exercise at least some of the defensive code that no longer gets run by the compiler as a whole. If any volunteers would like to take on the job of improving and tracking coverage (by a combination of more tests, unit tests, and marking code that is currently unreachable but should remain for safety purposes) that could be helpful.