Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: "Kevin G. Rhoads" <T_Rhoads@NoSpam.CLASSIC.MSN.COM>
Subject: Re: Mysterious data corruption in Fortran with -automatic
Date: 1998/06/04	[thread overview]
Message-ID: <01bd9038$56a0f7c0$LocalHost@stupidwin95> (raw)
In-Reply-To: 35774C1A.2985A59E@rhea.umd.edu


>I disagree.  Most likely you have hit a 'bug', but it's not the
>compiler that's the problem, it's the code itself.  For well
>written code you can compile it with *any* flags on *any* platform
>and it still runs without incident.

When something adds 2 + 2 and gives me -123e+78,
it is the compiler which has OVER-optimized the code
to the point where it is generating garbage.  

If you were to say, that well written code SHOULD be able
to be compiled with any flags on any platform and run
with correct output, then I would agree.  I have seen TOO
many cases where the COMPILER is in error.  

I don't trust my code.
I don't trust the compiler's libraries.
I don't trust the compiler's code generator.
I try my best to VERIFY all of these.

If something screwy happens, I check my code
first.  But I don't continue assuming it is my
problem forever.  I also check to see if the
problem changes or goes away if I change
platforms, compilers and compiler settings.

Even if it is an error in my code, changing
these other things can provide useful information
helping to locate the problem.

But when my code compiles cleanly under 6
different compilers.  And it generates the same
output from the exes from 5 of those compilers
no matter what settings I use in any of those five
compilers, but with the exe from the sixth compiler
it sometimes works fine but when compiled with
other settings it produces total garbage -- that is
fairly solid evidence that compiler number 6 has
a bug.  

I have been programming for over 30 years,
and I have seen a fair number of compiler bugs.

If you have tools sets whose quality justifies
your unreserved faith in their correctness,
you are lucky!

As for me, I trust, but I verify.
-- 
Kevin G. Rhoads, Ph.D.
T_Rhoads@NO_SPAM.Classic.MSN.COM
KRhoads@NO_SPAM.CmpNetMail.com



  parent reply	other threads:[~1998-06-04  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 ` Thorsten Ohl
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       ` Jeffrey J. Potoff
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       ` Robert O'Dowd
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     ` 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       ` 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-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     ` Kevin G. Rhoads [this message]
1998-06-05  4:00       ` Catherine Rees Lay
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