Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: mark@cita.toronto.edu (Mark Bartelt)
Subject: Re: horrible "cc -O" bug (DU 3.2c)
Date: 1997/05/13	[thread overview]
Message-ID: <EA4AE2.JG4@utcc.utoronto.ca> (raw)
In-Reply-To: slrn5nejpr.d7o.adisaacs@supreme.csl.mtu.edu


[ Andy Isaacson ]

>>  Absolutely.  However, the "bug" was observed by inspecting disassembled
>>  object code.  This is a case of the "looks like" effect.

Um, no.  This bug (no quotes around it, since it *is* a bug) was discovered
because a correct program dumped core.  I posted the original code fragment
which demonstrated the problem.  Someone else posted the disassembled object
code, to show exactly *how* the compiler was screwing up.

>>                                                            If the code to
>>  the right of the || or && has no side effects, then the program
>>  _cannot know_ if the code was executed or not.  In that case, the compiler
>>  is completely justified in executing the code anyway, if it wants to.  If
>>  the code has some side effects, however, the compiler must ensure that it
>>  is not executed in error.
>>  
>>  End result?  I am not convinced that this is a bug.  If the compiler
>>  generates correct results for all cases, then it is not a bug.

Sorry, go back and read the thread in its entirety, from the beginning.  That
should convince you that this really *is* a bug.  (And a couple of Digits have
acknowledged, via e-mail, that they agree.)

Mark Bartelt                                                      416/978-5619
Canadian Institute for                                   mark@cita.utoronto.ca
Theoretical Astrophysics                     http://www.cita.utoronto.ca/~mark

"Sheep not busy being shorn are busy frying"  --  Dylan, at a NZ lamb barbecue
             [ singing "It's all right, ma (I'm only bleating)" ]



  parent reply	other threads:[~1997-05-13  4:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-05-09  4:00 horrible "cc -O" bug (DU 3.2c) Mark Bartelt
1997-05-09  4:00 ` Jonathan Rozes
1997-05-09  4:00 ` John Hascall
1997-05-10  4:00   ` Gerald Feldman
1997-05-11  4:00   ` Roy Smith
1997-05-11  4:00     ` Michael C. Grant
1997-05-11  4:00     ` Gerald A. Feldman
1997-05-11  4:00       ` Roy Smith
1997-05-12  4:00         ` Mark Bartelt
1997-05-12  4:00           ` Andy Isaacson
1997-05-12  4:00             ` John Reinitz
1997-05-13  4:00             ` Mark Bartelt [this message]
1997-05-12  4:00         ` Jeff Sullivan USG
1997-05-12  4:00           ` Gerald A. Feldman
1997-05-12  4:00       ` Jeff Sullivan USG
1997-05-12  4:00       ` Peter Kocourek
1997-05-12  4:00       ` Bob Vickers
     [not found] ` <5l7hap$7la@usenet.pa.dec.com>
1997-05-12  4:00   ` Gerald A. Feldman
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox