Re: Was: Debug optimized code; Now: How many compiler bugs have you seen?

jfc@mit.edu (John F. Carr)
02 Oct 2008 00:35:37 GMT

          From comp.compilers

Related articles
[4 earlier articles]
Re: Was: Debug optimized code; Now: How many compiler bugs have you se ArarghMail809@Arargh.com (2008-09-24)
Re: Was: Debug optimized code; Now: How many compiler bugs have you se n.pipenbrinck@cubic.org (Nils) (2008-09-25)
Re: Was: Debug optimized code; Now: How many compiler bugs have you se sh006d3592@blueyonder.co.uk (Stephen Horne) (2008-09-25)
Re: Was: Debug optimized code; Now: How many compiler bugs have you se gneuner2@comcast.net (George Neuner) (2008-09-25)
Re: Was: Debug optimized code; Now: How many compiler bugs have you se dot@dotat.at (Tony Finch) (2008-09-25)
Re: Was: Debug optimized code; Now: How many compiler bugs have you se cfc@shell01.TheWorld.com (Chris F Clark) (2008-09-25)
Re: Was: Debug optimized code; Now: How many compiler bugs have you se jfc@mit.edu (2008-10-02)
| List of all articles for this month |
From: jfc@mit.edu (John F. Carr)
Newsgroups: comp.compilers
Date: 02 Oct 2008 00:35:37 GMT
Organization: Massachvsetts Institvte of Technology
References: 08-09-076 08-09-110 08-09-115 08-09-119
Keywords: optimize, debug
Posted-Date: 03 Oct 2008 08:36:46 EDT



Chris F Clark <cfc@shell01.TheWorld.com> wrote:
>So, I wonder, how many of you have experienced real compiler bugs,
>that you could verify was the compilers fault and not just "mysterious
>behavior" that could be fixed by changing the optimizer/debugger
>level?


I've probably averaged finding one code generation bug per year or two
in released compilers. Most bugs I found doing porting work -- build
some program on three or six or ten different systems and figure out
why it doesn't work on all of them. Often changing compiler options
made the program work. Typically I confirmed there was a bug by
looking at compiler output. I do not normally count "program crashes
when compiled -O2" as a confirmed compiler bug without more evidence.


I remember IBM xlc would generate bad code if you wrote an array
reference "inside out", index[array] instead of array[index]. (For
historic reasons the [] operator in C is commutative; I decided to
check whether xlc implemented as such and found that yes it tried but
no it failed.)


I have also had trouble with OS emulation code (Solaris 2.0 or 2.1
sometimes gave wrong answers for emulated integer multiply).


Now I'm responsible for a compiler and I'm really hoping that when we
ship I won't see one codegen bug report per customer per year.


--
        John Carr (jfc@mit.edu)


Post a followup to this message

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