6.2.10 C*$* assert [no] temporaries for constant arguments

Sometimes, KAP transformations are disabled when KAP is not sure about their effect on the rest of the program. For example, one possible transformation would turn the following code:

   SUBROUTINE X(I,N)
      IF (I .LT. N) I = N
    END

Into:

    SUBROUTINE X(I,N)
       I = MAX(I,N)
    END

But, if the actual parameter for I were a constant, call X(1,N) , it would appear that the value of the constant 1 was being reassigned. In fact, in some older versions of Fortran, the values of constants could be changed in this way. Without additional information, KAP is cautious and performs no argument-changing transformations within the subroutine.

Most compilers automatically put constant actual arguments into temporary variables to protect against this case. The assertion C*$* assert temporaries for constant arguments or the command switch -assume=c (the default) inform KAP that constant parameters are protected. The assertion C*$* assert no temporaries for constant arguments directs KAP to avoid transformations that might change the values of constant parameters.


Previous Page|Next Page|Contents|Index|
Command-Line Switches

Copyright © Digital Equipment Corporation. 1997. All Rights Reserved.