Re: Compilers QA

"Paul Pluzhnikov" <>
23 Jul 2001 02:25:57 -0400

          From comp.compilers

Related articles
Compilers QA (Ori Idan) (2001-07-03)
Re: Compilers QA (2001-07-06)
Re: Compilers QA (Tim Josling) (2001-07-17)
Re: Compilers QA (Joachim Durchholz) (2001-07-18)
Re: Compilers QA (2001-07-23)
Re: Compilers QA (Paul Pluzhnikov) (2001-07-23)
Re: Compilers QA (2001-07-23)
| List of all articles for this month |

From: "Paul Pluzhnikov" <>
Newsgroups: comp.compilers
Date: 23 Jul 2001 02:25:57 -0400
Organization: EarthLink Inc. --
References: 01-07-037 01-07-059 01-07-089
Keywords: testing, practice
Posted-Date: 23 Jul 2001 02:25:57 EDT

"Joachim Durchholz" <> wrote in message
> Oh, and if you can, write some code generators that stress test the
> compiler. Things that I have seen break compilers are:
> * Variable names of several K length
> * Several hundred levels of nesting
> * Statement nesting
> * Expression nesting
> * Several thousand cases in switch statements

These are all from commercial shipping C/C++ compilers:

I know of a compiler that exhibits quadratic slowdown on the number of
'#line' lines.

We generate code like this:

    #line 1 ""
    some code
    #line 1 ""
    some more code

This particular compiler takes 10 minutes to compile a 30,000-line

Another compiler ignores the '#line' lines altogether.
A third one does not properly instantiate templates if
the file is first preprocessed.
Forth one emits garbage into stdout when asked to do
"cc -E -v foo.c" -- make sure to keep diagnostic output
separate from stdout.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.