Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ut-ngp.UUCP Path: utzoo!utcsrgv!garfield!philabs!cmcl2!seismo!ut-sally!ut-ngp!oacb2 From: oacb2@ut-ngp.UUCP (oacb2) Newsgroups: net.unix-wizards,net.lang Subject: Re: smart compilers Message-ID: <1146@ut-ngp.UUCP> Date: Thu, 20-Dec-84 17:06:41 EST Article-I.D.: ut-ngp.1146 Posted: Thu Dec 20 17:06:41 1984 Date-Received: Fri, 21-Dec-84 06:42:45 EST References: <6599@brl-tgr.ARPA> <979@opus.UUCP> Organization: U.Texas Computation Center, Austin, Texas Lines: 23 > FORTRAN is less susceptible to clashes with the optimizer due to the > device-register sort of hassle but more susceptible to poor programming > such as parameter/COMMON aliasing, misunderstanding of modifying > initialized COMMON, etc. However, the IBM H Level FORTRAN Programmer's Guide does warn that code such as DO 100 I = 1 TO 10 IF (Y .GT. 0) X(I) = SQRT(Y) 100 CONTINUE (with X appropriately declared as an array of course) can cause an error because it tries to take the square root of a negative number. The optimizer compiles this as if it were TEMP = SQRT(Y) DO 100 I = 1 TO 10 IF (Y .GT. 0) X(I) = TEMP 100 CONTINUE -- Mike Rubenstein, OACB, UT Medical Branch, Galveston TX 77550