From: Robert O'Dowd <nospam@nonexistant.com>
Subject: Re: Mysterious data corruption in Fortran with -automatic
Date: 1998/06/05 [thread overview]
Message-ID: <3577C0BE.3F3C879D@nonexistant.com> (raw)
In-Reply-To: 01bd9036$7ae7fea0$LocalHost@stupidwin95
Kevin G. Rhoads wrote:
>
> Please read what I wrote and respond to that.
>
> If the code gives CORRECT answers with compiler
> optimizations OFF and it gives WRONG answers
> with compiler optimizations ON -- question, where
> is the bug?
>
> Answer, in the compiler optimizations -- the code
> did NOT change, the compiler did.
Ah, if the world was exactly that simple.
There are many things in language specs that are "undefined".
This means the compiler is free to to as it will on code
that invokes undefined behaviour.
A good optimiser will push the letter of the law with
the language, if by doing so it can improve performance
(however you measure "performance"). In doing so, it
could well change the results you get from the non-compliant
code. Both results are consistent with the word "undefined
behaviour".
-<Automagically included trailer>
Robert O'Dowd Ph +61 (8) 9553 3618
DSTO Bldg A51 Fax +61 (8) 9553 3577
HMAS Stirling Email:
robert.odowd@dsto.defence.gov.au
Rockingham, Western Australia, 6958
Disclaimer: Opinions above are mine and may be worth what you paid for
them
next prev parent reply other threads:[~1998-06-05 4:00 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-04 4:00 Mysterious data corruption in Fortran with -automatic Keith Refson - real email address in signature
1998-06-04 4:00 ` Kevin G. Rhoads
1998-06-04 4:00 ` Jeffrey J. Potoff
1998-06-04 4:00 ` Kevin G. Rhoads
1998-06-05 4:00 ` Catherine Rees Lay
1998-06-04 4:00 ` Kevin G. Rhoads
1998-06-05 4:00 ` William Clodius
1998-06-05 4:00 ` Thorsten Ohl
1998-06-05 4:00 ` Kevin G. Rhoads
1998-06-05 4:00 ` William Clodius
1998-06-05 4:00 ` Ian Chivers
1998-06-05 4:00 ` Kevin G. Rhoads
1998-06-05 4:00 ` Ian Pattie
1998-06-05 4:00 ` Jeffrey J. Potoff
1998-06-05 4:00 ` Kevin G. Rhoads
1998-06-06 4:00 ` Rob Komar
1998-06-04 4:00 ` Stuart Brook
1998-06-04 4:00 ` Kevin G. Rhoads
1998-06-05 4:00 ` Stuart Brook
1998-06-05 4:00 ` Toon Moene
1998-06-04 4:00 ` Kevin G. Rhoads
1998-06-05 4:00 ` Jeffrey J. Potoff
1998-06-05 4:00 ` Keith Refson - real email address in signature
1998-06-05 4:00 ` Kevin G. Rhoads
1998-06-05 4:00 ` Robert O'Dowd
1998-06-05 4:00 ` Kevin G. Rhoads
1998-06-05 4:00 ` John Appleyard
1998-06-05 4:00 ` Keith Refson - real email address in signature
1998-06-05 4:00 ` Robert O'Dowd [this message]
1998-06-05 4:00 ` Kevin G. Rhoads
1998-06-05 4:00 ` Stuart Brook
1998-06-05 4:00 ` Jeffrey J. Potoff
1998-06-05 4:00 ` Harald Anlauf
1998-06-05 4:00 ` Kevin G. Rhoads
1998-06-08 4:00 ` Paul Winalski
1998-06-04 4:00 ` Thorsten Ohl
1998-06-06 4:00 ` SUMMARY: Code errors which can masquerade as compiler bugs " Kevin G. Rhoads
1998-06-11 4:00 ` Ron Sverdlove x2517
1998-06-08 4:00 ` Steve Lionel
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