[comp.lang.fortran] More on jumping into IF-ELSE-ENDIF blocks

jim@jagubox.gsfc.nasa.gov (Jim Jagielski) (01/31/91)

Seems that there are a bunch of compilers out there which accept the illegal
transfer of control INTO an if-else-endif statement block...

There's VAX FORTRAN...
and f77 from Absoft...
and f77 on MIPS and SGI machines (yeah, I know, same compilers :)

Well, maybe it's premature to say a bunch, but it looks like there COULD be.

P.S.   It's one thing for a compiler to accept to do something illegal,
       but it's another to accept it and NOT SAY ANYTHING ABOUT IT...
--
=======================================================================
#include <std/disclaimer.h>
                                 =:^)
           Jim Jagielski                    NASA/GSFC, Code 711.1
     jim@jagubox.gsfc.nasa.gov               Greenbelt, MD 20771

"Exploding is a perfectly normal medical phenomenon. In many fields of
 medicine nowadays, a dose of dynamite can do a world of good."

system@alchemy.chem.utoronto.ca (System Admin (Mike Peterson)) (02/02/91)

In article <2822@dftsrv.gsfc.nasa.gov> jim@jagubox.gsfc.nasa.gov (Jim Jagielski) writes:
>
>Seems that there are a bunch of compilers out there which accept the illegal
>transfer of control INTO an if-else-endif statement block...
>
>There's VAX FORTRAN...
>and f77 from Absoft...
>and f77 on MIPS and SGI machines (yeah, I know, same compilers :)
>
>Well, maybe it's premature to say a bunch, but it looks like there COULD be.
>
>P.S.   It's one thing for a compiler to accept to do something illegal,
>       but it's another to accept it and NOT SAY ANYTHING ABOUT IT...

Add the HP/Apollo ftn and the SUN f77 compiler to the list.

I agree 100% with the last comment. One case we had caused the program
to run for more than 45 minutes on the Apollo DN10000 (their top of the
line RISC machine) and never did finish. On the SUN (I forget which SPARC
system, sorry), it ran for about 20 minutes, and gave the CORRECT answer.
When all the illegal jumps into IF/DO blocks were removed, the program
ran in less than 1 minute on the Apollo, 2 minutes on the SUN.
-- 
Mike Peterson, System Administrator, U/Toronto Department of Chemistry
E-mail: system@alchemy.chem.utoronto.ca
Tel: (416) 978-7094                  Fax: (416) 978-8775