From: Robert O'Dowd <nospam@nonexistant.com>
Subject: Re: Mysterious data corruption in Fortran with -automatic
Date: 1998/06/05 [thread overview]
Message-ID: <3577C554.9F50B096@nonexistant.com> (raw)
In-Reply-To: wxra14fd7u.fsf@earth.ox.ac.uk
Keith Refson - real email address in signature wrote:
>[Snip]
> Nevertheless I believe the part of code that I am having trouble with
> and started this thread about does *not* suffer from failure to
> initialize, aliasing or assumptions of SAVE behaviour or array bounds
> errors (at least not in the part where the faulty result occurs). Does
> anyone have any further suggestions as to what to look for? If not
> then maybe this really is one of the relatively rare cases of a
> genuine optimizer bug.
>
Failure to initialise, aliasing, assumptions about SAVE, and array
bounds
errors anywhere in your complete program can cause faulty results.
Somewhere in this thread, I recall a mention that insertion of a
write() statement made the program produce correct results.
This is actually a danger sign; it is a clear sign that some
part of memory is being incorrectly written to. Inserting the
write statement simply changes the place that gets written to,
but doesn't do away with the bad behaviour.
Some things to look for
1) failure to initialise, aliasing, save behaviour, or array
bounds *anywhere* in your complete program (not just "in the
part where the fault occurs"). One thing to look at is an
array passed to a function, and falling off the end of that.
2) If you pass a variable twice to a subprogram (e.g.
CALL SUB(I,I)) make sure the called subprogram doesn't
change both values --- particularly if the computations
are complex. While this behaviour does not always
produce incorrect results, as far as the called module
is concerned its arguments are aliased.
-<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 ` 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 ` Kevin G. Rhoads
1998-06-05 4:00 ` Catherine Rees Lay
1998-06-04 4:00 ` Kevin G. Rhoads
1998-06-05 4:00 ` Harald Anlauf
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 ` Keith Refson - real email address in signature
1998-06-05 4:00 ` Robert O'Dowd [this message]
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 ` Jeffrey J. Potoff
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 ` 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