HP Fortran Programmer's Guide (September 2007)

Migrating to HP Fortran
Migration issues
Chapter 10 225
Object code issues
Some migration problems do not manifest themselves until runtime, when the program
behaves unexpectedly or produces incorrect results. Such problems can occur when
incompatible HP FORTRAN 77 object files and HP Fortran object files are linked together.
Although the format of object files generated by f77 is compatible with the format of object
files generated by f90, individual data items within the f77-generated file may not be.
Problems with migration can occur if the HP FORTRAN 77 object files represent data in a
nonstandard form. For example, HP Fortran does not allow misaligned data or nonstandard
logical representations, whereas HP FORTRAN 77 does.
Procedure interfaces, on the other hand, usually do not present problems, so long as the
procedures are properly defined and called in the HP FORTRAN 77 source code. That is, as
long as the definition and call match in argument types, return types, and alternate return
capability, the HP Fortran compiler can do the appropriate conversions, copying, etc., to make
the calls work.
To resolve object-code incompatibilities, you will need access both to the source file and to the
f77 command line that was used to generate the HP FORTRAN 77 object file. Examine the
source file for directives that are not supported by HP Fortran, such as the $LOGICAL
directive. See “Directives” on page 219 for a list of the directives that are supported. Also, look
over the f77 command line for any of the unsupported options that are listed in Table on
page 215.
-R4 +real_constant=single Make single precision the default for all
single-precision constants
-R8 +real_constant=double Make double precision the default for all
single-precision constants
-S +asm Generate assembly listing
-s +strip Strip symbol table information from linker output
-Y +nls Enable Native Language Support
+Z +pic=long Generate position-independent code (large model)
+z +pic=short Generate position-independent code (small model)
Table 10-5 f77 options supported by f90 (Continued)
f77
option f90 option function