Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: "Jeffrey J. Potoff" <jpotoff@rhea.umd.edu>
Subject: Re: Mysterious data corruption in Fortran with -automatic
Date: 1998/06/05	[thread overview]
Message-ID: <35783599.98D4220F@rhea.umd.edu> (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?
>

In your code.
 
> Answer, in the compiler optimizations -- the code
> did NOT change, the compiler did.

The way the program accesses memory will change due to the
optimization level (ie, the code gets reorganized).  If you
don't initialize your variables or pass them correctly to
subroutines the optimized code can give incorrect results
or may not run at all.  Well written code will not suffer
from these problems.

Jeff



  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     ` 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 [this message]
1998-06-05  4:00       ` Robert O'Dowd
1998-06-05  4:00         ` Kevin G. Rhoads
1998-06-05  4:00           ` Jeffrey J. Potoff
1998-06-05  4:00           ` Stuart Brook
1998-06-05  4:00       ` Keith Refson - real email address in signature
1998-06-05  4:00         ` Robert O'Dowd
1998-06-05  4:00           ` John Appleyard
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         ` Kevin G. Rhoads
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     ` Kevin G. Rhoads
1998-06-05  4:00       ` Catherine Rees Lay
1998-06-04  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-05  4:00       ` Ian Chivers
1998-06-05  4:00         ` Kevin G. Rhoads
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       ` William Clodius
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