Bug/Feature of Fortran under 3003?

Jon Alperin jona at iscp.Bellcore.COM
Mon Apr 22 10:30:47 AEST 1991


In article <1991Apr19.001820.13721 at watson.ibm.com>, prener at 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 <var> = <var> + loopcount value,
saving many steps and cycle times.....could this be the case?

jon

  
|> In article <1991Apr11.150613.24468 at news.nd.edu>, mahesh at 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 at iscp.bellcore.com
---> Voicenet: (908) 699-8674
---> UUNET: uunet!bcr!jona

* All opinions and stupid questions are my own *



More information about the Comp.unix.aix mailing list