Many code bases qualify as "compiler stress tests". I once recommended that the gcc team use XEmacs as a stress test because the source code's unusual C/C++/Lisp style tended to tickle gcc bugs. I fondly remember the old "C preprocessor fails when a macro call contains a comment longer than 128 lines" gcc bug.
Hotspot is an even better compiler stress test. Again I recommend that the gcc team use it as part of their testing cycle. Martin On Fri, Jun 20, 2008 at 3:55 AM, Andrew Haley <[EMAIL PROTECTED]> wrote: > Erik Trimble wrote: > >> Consequently, it is very sensitive to bugs and changes in a compiler. >> For large organizations (such as those managing a distro), it may make >> sense to put in the effort to make sure their "standard" compiler works >> with OpenJDK. It is none too difficult for even such an org to use a >> different compiler, though. > > I have a very bad feeling about this. In the Bad Old Days when I > worked in proprietary software, it was not uncommon that a code base > would only compile correctly with a "blessed" compiler. Eventually, > that compiler would be withdrawn from support or we'd need to use a > new compiler for some other reason, and we'd have to fix the bugs in > our code base to work with the new compiler. I now regard such > antediluvian habits as grossly unprofessional, and I have no desire to > go back to them. > >> For smaller companies and individuals, I think we (i.e. the community, >> not just Sun), should _strongly_ encourage them to pick one of the >> handful of "official" compilers, which are specified in the source >> documentation. > > Quite a few Linux distros are downstream of Red Hat, and start with a > compiler built from the Red Hat branch. The RH compiler has built an > entire Linux distro, after all. > > The changes we had to make to build OpenJDK with gcc 4.3 were to fix > nonstandard C++ code and to turn off -Werror because gcc 4.3 is much > more fulsome in its warnings. Rather than insist on using an older > compiler, we would probably be better off fixing the code that > generates the warnings. > >> Certainly, we should pick compiler versions which are easily >> available, and will remain so for several years. > > One of the great things about pushing HotSpot into the open is that it > will be useful as a test for compilers. If, as you say, it is so much > harder to compile than virtually any other piece of software, it will > be a great test. > > Andrew. > >