Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!news.cs.indiana.edu!att!bellcore!iscp.Bellcore.COM!jona From: jona@iscp.Bellcore.COM (Jon Alperin) Newsgroups: comp.unix.aix Subject: Re: Bug/Feature of Fortran under 3003? Message-ID: <1991Apr22.003047.27922@bellcore.bellcore.com> Date: 22 Apr 91 00:30:47 GMT References: <1991Apr11.150613.24468@news.nd.edu> <1991Apr19.001820.13721@watson.ibm.com> Sender: usenet@bellcore.bellcore.com (Poster of News) Reply-To: jona@iscp.Bellcore.COM (Jon Alperin) Organization: Bell Communications Research (Bellcore) Lines: 47 In article <1991Apr19.001820.13721@watson.ibm.com>, prener@watson.ibm.com (Dan Prener) writes: Here's my posting, article follows for reference: Before telling IBM about this "bug" look at the DO loop...does it have a finite ending? If the Do loop does not have a branch in it, the compiler will figure out what the end result is, and replace the entire DO loop with the result. For example: If you have a DO loop which iterates and adds a number to a variable, and the answer always comes out the same, the optimizer will figure out that the entire loop can be replaced with a = + loopcount value, saving many steps and cycle times.....could this be the case? jon |> In article <1991Apr11.150613.24468@news.nd.edu>, mahesh@caradhras.cc.nd.edu (Mahesh "BigMan" Subramanya) writes: |> |> |> |> We just upgraded to 3003 recently, and came across this |> |> rather neat bug/feature of the FORTRAN compiler, where when a program |> |> is compiled with the optimizer turned on, the compiler merrily |> |> "skips" over entire sections of code. It looks like DO loops are |> |> the most likely candidates for being skipped over. I've not been able |> |> to track the specifics down yet (very large source). |> |> |> |> Has anyone seen this, and do you know what it is |> |> |> |> Oh, B.T.W., compiling without the optimizer works fine... |> |> |> |> Frustrated and Frantic... |> |> |> |> Have you reported this to IBM? |> -- |> Dan Prener (prener @ watson.ibm.com) -- Jon Alperin Bell Communications Research ---> Internet: jona@iscp.bellcore.com ---> Voicenet: (908) 699-8674 ---> UUNET: uunet!bcr!jona * All opinions and stupid questions are my own *