From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb9cd,10b7a9a3731f3fc8 X-Google-Attributes: gidfb9cd,public X-Google-Thread: 1164f8,10b7a9a3731f3fc8 X-Google-Attributes: gid1164f8,public X-Google-Thread: 1125fa,10b7a9a3731f3fc8 X-Google-Attributes: gid1125fa,public X-Google-Thread: f782f,10b7a9a3731f3fc8 X-Google-Attributes: gidf782f,public From: ivie@cc.usu.edu (Roger Ivie) Subject: Re: Alpha Dead? Naaahhhh.... (was Re: Is there a list of Alpha NT Date: 1997/12/20 Message-ID: #1/1 X-Deja-AN: 308909911 References: Organization: Utah State University Newsgroups: comp.os.ms-windows.nt.admin.misc,comp.os.ms-windows.nt.advocacy,comp.sys.dec,comp.os.ms-windows.nt.misc In article , Dirk Grunwald writes: > "Ant Moore" writes: >> Optimization doesn't have anything to do with "non-standard" coding >> practices. If the code is legal (in that it compiles) then the only > --- > > This is the root of your problem. Just because code compiles doesn't > mean it's 'legal'. Optimization can expose errors in your code due to > code movement, use of temporaries, differences in the memory layout -- > any number of things. If your code is 'correct', as opposed to > 'legal', these shouldn't matter. My favorite VMS FORTRAN compiler bug (circa VMS 3.0) went something like this. I was reading a file into an array using both an END= clause and an implied do loop. I'm going to totally botch the syntax (it's been a _long_ time since I last used an implied do loop, and I always had to look them up in the manual anyway): READ(mumble,END=100)Booger(I),I=1,512 Then I wanted to look at I to see how much data was read. The compiler generated code which: - Moved 512 to I - Ran the implied DO loop with a register for the counter so that when the END= fired, I was always 512 regardless of how many items had been read. I had to compile that particular subroutine /NOOPTIMIZE to get it to work right. AFAIK the code is legal, although perhaps a bit unusual... -- -------------------------+------------------------------------------------ Roger Ivie | Impeach Bob Palmer! ivie@cc.usu.edu | http://cc.usu.edu/~ivie/ |