compatible with implementations that allocate static storage, compile with the +saveoption. This option causes the compiler to act as though all local variables had the SAVEattribute.
As mentioned in “Automatic and static variables” (page 67), saving all variables in static storage can degrade performance. If performance is an issue, consider using the +Oinitcheck option. Unlike the +save option, +Oinitcheckdoes not “save”
For detailed information about the +save and +Oinitcheck options, see HP Fortran Programmer’s Reference.
Large word sizeThe word size of default integers, reals, and logicals in HP Fortran is 4 bytes. However, some implementations of Fortran
You can double the sizes of default integer, real, and logicals by compiling with the +autodbl option, making them compatible with implementations that use the larger word size. This option also doubles the sizes of items declared with the COMPLEXand DOUBLE PRECISIONstatements, but not the BYTEand DOUBLE COMPLEXstatements.
Increasing the size of
For usage information about the +autodbland +autodbl4options, see “Increasing default data sizes” (page 70). For detailed descriptions of these options, see the HP Fortran Programmer’s Reference.
If a loop is coded so that its initial loop count is greater than its final loop count, standard Fortran 90 requires that the loop never execute. However, under some implementations of FORTRAN 66, if a DO loop is reached, it executes for at least one iteration, even if the DO variable is initialized to a value greater than the final value. This is called a
To duplicate the behavior of a
PROGRAM main DO 10 i = 2, 1
PRINT *, 'Should never happen in standard Fortran 90.' 10 CONTINUE
END PROGRAM main
When compiled with the command line:
$ f90 test_loop.f90
the PRINTstatement will never execute because the initial loop count is higher than the final loop count. To force the loop to execute at least once, compile it with the command line:
$ f90 +onetrip test_loop.f90
When you run the program now, it produces the output:
$ a.out
Should never happen in standard Fortran 90.
Using porting options 145