[log in to unmask] wrote:
...
>I would argue that it is only allowed if the resulting value is the same as
>that that would follow from the assignment (which is I believe Keith
>Bierman's and James Giles's interpretation), but it seems that some members
>of J3 interpret "A common optimization" as implying an allowed optimization.
Or, more to the point:
However, should the temporary location not have the same
representation, for example a Fortran processor using registers
with a precision larger than the precision of SUM, then a processor
making such an optimization would not be conforming.
I guess I need to actually read the documents in question (though
finding them is often a pain). But this last is the very question I
was mainly inquiring about. It seemed to me that the elimination
of SUM would be allowed (assuming it's REAL) if what you did
was:
100 D = REAL(A + B ,KIND(SUM)) + C
or
130 D = REAL(B + A, KIND(SUM)) + C
That now seems to be explicitly the case.
--
J. Giles
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|