From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1094ba,cf4ba3d07912d446 X-Google-Attributes: gid1094ba,public X-Google-Thread: 1164f8,cf4ba3d07912d446 X-Google-Attributes: gid1164f8,public From: Thorsten Ohl Subject: Re: Mysterious data corruption in Fortran with -automatic Date: 1998/06/04 Message-ID: #1/1 X-Deja-AN: 359532429 References: Organization: TH Darmstadt Newsgroups: comp.sys.dec,comp.lang.fortran rubber@bounce.com (Keith Refson - real email address in signature) writes: > I can't see any way this could be a bug in the code. Obviously I > have checked for array bounds problems, uninitialized variables and > found nothing. More mysteriously exactly the same behaviour is > observed when the code is compiled with f90 instead of f77. >From your symptoms, there is a 99.99% chance, that you have forgotten to SAVE local variables that are supposed to keep their values across invocations of a procedure. Legacy code is typically full of such problems, because many Fortran compilers used to SAVE by default and programmers forgot to SAVE. -- Thorsten Ohl, Physics Department, TU Darmstadt -- ohl@hep.tu-darmstadt.de http://crunch.ikp.physik.tu-darmstadt.de/~ohl/ [<=== PGP public key here]