re: Fortran compiler optimisation (Dennis Ritchie <7549-15328> 0112710)
Mon, 14 Nov 1994 06:53:09 GMT

          From comp.compilers

Related articles
Fortran compiler optimisation (1994-11-11)
re: Fortran compiler optimisation 7549-15328 ( (Dennis Ritchie0112710)) (1994-11-14)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (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)

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 no longer exhibits the bug.

Dennis Ritchie

Post a followup to this message

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