From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,cf4ba3d07912d446 X-Google-Attributes: gid1164f8,public X-Google-Thread: 1094ba,cf4ba3d07912d446 X-Google-Attributes: gid1094ba,public From: "Kevin G. Rhoads" Subject: Re: Mysterious data corruption in Fortran with -automatic Date: 1998/06/05 Message-ID: <01bd908d$f043b700$LocalHost@stupidwin95>#1/1 X-Deja-AN: 359842770 References: <01bd9013$76f09aa0$6f242499@stupidwin95><35774C1A.2985A59E@rhea.umd.edu><01bd9036$7ae7fea0$LocalHost@stupidwin95> Newsgroups: comp.sys.dec,comp.lang.fortran But this is NOT what the original flamer claimed. His assertion was that the error MUST be in the code. That is just as silly as asserting the error MUST be the compiler. I did not mean to assert either such silliness. Although, in response to the ignorant, unhelpful and totally lacking in substance or information post made several posts back, I simplified the reasoning so the flamer could (hopefully) understand it. In so doing I simplified it to the point of error -- oversimplified to death. You now, are guilty of the same: > If your program gives correct results with optimization *and* > -noautomatic, then the bug is almost always in the code. It takes MORE information than just that. If you had summarized that by asserting that when -noautomatic or a global SAVE make purported optimizer bugs disappear that is a strong sign of code bugs not optimizer bugs then I would agree. But as stated, it is oversimplified and subject to misinterpretation. Just as was my response to Jeffrey's flame. So -- let me make clear -- AFTER the code has been carefully checked (and more than once) and preferably after the code has had a review by other than it's author (not always possible) and AFTER testing for uninitialized variables, non-persistent variables treated as persistent, parameter list mismatches or the same variable being passed by reference to two or more different formal parameters and, if possible, after testing the code on multiple platforms with multiple compilers then there comes a point when one has a reasonable expectation that maybe there is a compiler bug and that eventuality should be tested. This is NOT the first thing to suspect. Nor the second or third, but it does go on the list of possibles! Jeffery's post assert it NEVER appears on the list of things to suspect and check, and in replying to that silliness I oversimplified. Suspicion of a compiler bug DOES belong in the list of things to check -- but it should be WAY DOWN the list. -- Kevin G. Rhoads, Ph.D. T_Rhoads@NO_SPAM.Classic.MSN.COM KRhoads@NO_SPAM.CmpNetMail.com