Re: compiler bugs

Hans-Peter Diettrich <>
Tue, 28 Apr 2009 11:56:16 +0200

          From comp.compilers

Related articles
Re: Compiler bugs (2002-01-05)
Re: Compiler bugs (Christian Bau) (2002-01-05)
Re: Compiler bugs (David Chase) (2002-01-14)
compiler bugs (Sid Touati) (2009-04-27)
Re: compiler bugs (Hans-Peter Diettrich) (2009-04-28)
Re: compiler bugs (Jeremy J Starcher) (2009-04-28)
Re: compiler bugs (Louis Krupp) (2009-04-28)
Re: compiler bugs (Jonathan Thornburg) (2009-04-28)
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)
[18 later articles]
| List of all articles for this month |

From: Hans-Peter Diettrich <>
Newsgroups: comp.compilers
Date: Tue, 28 Apr 2009 11:56:16 +0200
Organization: Compilers Central
References: 09-04-072
Keywords: errors
Posted-Date: 28 Apr 2009 14:50:36 EDT

Sid Touati schrieb:

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

The most general method:

Reduce the code, where you observed an possible compiler bug, until you
have a small program to reproduce the error. Then give that program to
the compiler writers.

The most sophisticated method:

Use an decompiler to re-create the source code from the executable, and
search for differences. A decompiler may find erroneous machine code
itself, when the code is not reducible to high-level statements and

There exist many other methods in between, like inspecting the
disassembled source code for obvious errors. This is what a decompiler
will do automatically.

A simple method is using another compiler, or other optimization
options, to find out different behaviour of the executables. But this is
a weak method, sensitive to uninitialized variables, wild pokes and
other coding errors.


Post a followup to this message

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