[Info-vax] OpenVMS RTL Screen Management (SMG$) Manual
abrsvc
dansabrservices at yahoo.com
Fri Aug 3 13:39:01 EDT 2012
On Friday, August 3, 2012 11:34:34 AM UTC-4, Ken Fairfield wrote:
> On Friday, August 3, 2012 5:20:48 AM UTC-7, abrsvc wrote: [...] > > The above sparked another thought as well... > > Fortran on the I64 platform is the F90 compiler. While most code > will compile and work as expected, there are cases where behavior > will change. This is more due to reliance on how the compiler > generated code than anything else and may be subtle. As an example, > IF statements that use variables as array indices can behave > differently if the index is checked in the IF statement itself. > There is no order of evaluation specified by the standard for IF > statement blocks. Some code depends upon the IF blocks being > evaluated left to right. This is not guaranteed and can cause > problems. This is one example of a potential code behavior change > that moght not seem obvious. Well, the order if evaluation of the expressions in a Fortran IF statement has never been defined, and I believe the standards, as far back as F77, have always warned that expressions may be evaluated in any order. In addition, there is no "short circuiting" in Fortran as may be expected from other languages. It's up to the "processor", e.g., the compiler, what happens. That said, I clearly remember warnings in the *VAX* Fortran documumentation goiong all the way back to the 3.0 release about this aspect of expression evaluation. So it's a problem with the code... Also, while you *may* never have encountered this feature with VAX Fortran, I relatively certain it would have shown itself with your first port to Alpha. -Ken
As I thought I indicated, there is no requirement for any order in any of the standards. It is often the case where the code inadvertently relies on the order that was present with the original compiler. The point I was making is that the order (in my experience with I64 ports) changes from that generated by either VAX or Alpha compilers. I have had code that "worked" on VAX and ALpha but failed to behave on the I64 because of this. It was not intentional and the code was corrected on all machines. It took the I64 to realize the shortcoming.
More information about the Info-vax
mailing list