lionel@quark.zko.dec.com (Steve Lionel) wrote:
>
>As others have mentioned, what you are doing violates a handful of rules
>in the Fortran standard and the results are unpredictable. Check your
>compiler vendor's documentation carefully to see if they provide ways to
>inform the compiler that it can't trust language rules to be followed for
>variable accesses. In Digital's compilers, this is done by declaring the
>relevant variables VOLATILE.
>
>Most of all, DON'T rely on current behavior staying that way. For example,
>up until a few years ago, compilers tended to always go to memory for
>COMMON block references, but nowadays many of them will copy values from
>COMMON to registers, expecting that references to COMMON will occur only
>at routine calls. People who wrote programs using COMMON to "avoid
>optimization" found their programs broke when the compilers got smarter.
>--
>
>Steve Lionel mailto:lionel@quark.zko.dec.com
>Fortran Development http://www.digital.com/info/slionel.html
>Digital Equipment Corporation
>110 Spit Brook Road, ZKO2-3/N30
>Nashua, NH 03062-2698 "Free advice is worth every cent"
>
>For information on Digital Fortran, see http://www.digital.com/info/hpc/fortran/
>
news:4mvog1$cr2@zk2nws.zko.dec.com