Re: compiler bugs

glen herrmannsfeldt <>
Wed, 29 Apr 2009 17:02:32 +0000 (UTC)

          From comp.compilers

Related articles
[8 earlier articles]
Re: compiler bugs (2009-04-28)
Re: compiler bugs (George Peter Staplin) (2009-04-28)
Re: compiler bugs (Marco van de Voort) (2009-04-29)
Re: compiler bugs (2009-04-29)
Re: compiler bugs (Tony Finch) (2009-04-29)
Re: compiler bugs (Derek M. Jones) (2009-04-29)
Re: compiler bugs (glen herrmannsfeldt) (2009-04-29)
Re: compiler bugs (Jeremy J Starcher) (2009-04-29)
Re: compiler bugs (Walter Banks) (2009-04-30)
Re: compiler bugs (Chris F Clark) (2009-04-30)
Re: compiler bugs (2009-05-01)
Re: compiler bugs (Gene) (2009-05-01)
Re: compiler bugs (Christopher Glaeser) (2009-05-04)
[8 later articles]
| List of all articles for this month |

From: glen herrmannsfeldt <>
Newsgroups: comp.compilers
Date: Wed, 29 Apr 2009 17:02:32 +0000 (UTC)
Organization: California Institute of Technology, Pasadena
References: 09-04-072 09-04-080
Keywords: errors
Posted-Date: 01 May 2009 19:17:40 EDT wrote:
> (Sid Touati) wrote:

>> How can a simple programmer detect a bug in a compiler ? is there some
>> well known verification techniques ?

> If there is, I don't know it.

Best is to find the smallest program that demonstrates the bug, and
that you can verify satisfies the appropriate language standard.

> Compiler writers generally test their compilers quite hard - there
> are various test suites of source code available, and all serious
> compiler writing organisations will develop test sets of their own
> and expand them as they fix bugs - but there is no simple and
> all-embracing method.

I can only think of a few that I have seen over the years, that I
could reduce down and demonstrate with a small program. One was a C
compiler that miscompiled x++ in the case where x was (double). While
legal, presumably it didn't come up in the testing that was done. (If
I remember it right, it compiled as ++x.) I have somewhat of a
tendency to try things that I know are supposed to work, but are less
obvious than others.

-- glen

Post a followup to this message

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