Re: Fortran compiler optimisation (Doug Scofield)
Tue, 15 Nov 1994 19:47:38 GMT

          From comp.compilers

Related articles
Fortran compiler optimisation (1994-11-11)
Re: Fortran compiler optimisation (1994-11-15)
Re: Fortran compiler optimisation (1994-11-21)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Doug Scofield)
Keywords: Fortran
Organization: Harris CSD, Ft. Lauderdale, FL
References: 94-11-076
Date: Tue, 15 Nov 1994 19:47:38 GMT

|> c program to test bug
|> fred=10.0E-12
|> fred=(fred*1000000)*500000
|> george=10.0E-12
|> george=(george*1000000.0)*500000.0
|> print *, fred,george
|> end

Our compiler produces correct output at all levels and all
combinations of safe/unsave optimizations. We believe parens :-)
Correct output is also produced if the parens are removed from
the first expression: datatypes of intermediates are determined
in evaluation order and the constants are promoted to the result
type prior to evaluation. With maximal optimization, there's no
math at run-time anyway...

doug scofield
harris computer systems ft lauderdale, florida

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.