On 24 July 2007 07:42, ?? wrote: > Hi: > I know GCC is a wonderful compiler collection. I like it and trust > it. But, I can't find any formal docs about Testing GCC, both unit > testing and integrat testing. I think, as a software, GCC should be > tested and own a test report. > > Can someone give me some infomation about how the GCC workteam test > it? Lexical analysis, syntactical analysis, RTL generation ... or > testing from other aspects. > > Maybe I ask a strange question, maybe it isn't worth thinking:).
There's no such thing as strange questions, just strange people asking them. Err... wait a minute, that doesn't sound quite right! > I'm interested about it. Also I need your help. Thank you! ^_^ Quick summary: GCC does not have any formal unit testing. There are a lot of run-time consistency checks that can be compiled in by configuring with --enable-checking, and these cover a lot of the same basic are-things-doing-what-we-expect-them-to ground that unit tests would. Apart from that, GCC also has a vast regression testsuite. (It's slightly misnamed; some of the testcases are more like unit tests, but most of them are real code snippets that have uncovered bugs in GCC in the past, so we'll see if the same bug ever recurs). This is one of the main metrics most people use to test GCC. Many of the tests are cleverly designed to probe at some of the inner workings of the compiler, by examining tree-dumps and assembler outputs. See http://gcc.gnu.org/onlinedocs/gccint/Testsuites.html for the internal documentation on the testsuite framework. See also the GCC wiki page on the subject: http://gcc.gnu.org/wiki/TestingGCC Also, as described at http://gcc.gnu.org/testing/, there are a number of individuals and teams running continuous integration tests, including regression tests. There are also projects which measure and track gcc performance in terms of time and memory usage and generated code time and memory usage over the long term; see http://gcc.gnu.org/benchmarks/ for CSiBE and others. cheers, DaveK -- Can't think of a witty .sigline today....