re: Fortran compiler optimisation

dmr@research.att.com (Dennis Ritchie <7549-15328> 0112710)
Mon, 14 Nov 1994 06:53:09 GMT

          From comp.compilers

Related articles
Fortran compiler optimisation w.purvis@daresbury.ac.uk (1994-11-11)
re: Fortran compiler optimisation 7549-15328 (dmr@research.att.com (Dennis Ritchie0112710)) (1994-11-14)
| List of all articles for this month |

Newsgroups: comp.compilers
From: dmr@research.att.com (Dennis Ritchie <7549-15328> 0112710)
Keywords: Fortran, errors
Organization: AT&T Bell Labs, Murray Hill, NJ
References: 94-11-076
Date: Mon, 14 Nov 1994 06:53:09 GMT

Bill Purvis observed that several Fortran compilers (including f2c)
mishandle


fred = (fred*1000000)*500000


apparently by folding the constants as integers, and silently
suffering overflow. I confirm that the f77 supplied with local
SGI IRIX machines do this, and so did f2c.


Once David Gay learned of f2c's misbehavior, he fixed it;
the latest version of f2c at netlib.att.com no longer exhibits the bug.


Dennis Ritchie
dmr@research.att.com
--


Post a followup to this message

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