HP Fortran Programmer Guide (766160-001, March 2014)
Table 41 f77 options supported by f90 (continued)
functionf90 optionf77 option
Do not mark linker output demand load+nodemand_load-Q
Mark linker output demand load+demand_load-q
Make single precision the default for all single-precision
constants
+real_constant=single-R4
Make double precision the default for all single-precision
constants
+real_constant=double-R8
Generate assembly listing+asm-S
Strip symbol table information from linker output+strip-s
Enable Native Language Support+nls-Y
Generate position-independent code (large model)+pic=long+Z
Generate position-independent code (small model)+pic=short+z
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” (page 134) for a list of the directives that are supported. Also, look over thef77
command line for any of the unsupported options that are listed in Table on page 221.
If you find object-code incompatibilities, you should change the source code and recompile with
the f90command.
Data file issues
In general, data files are the easiest files to migrate because the data files produced by the two
Fortrans are compatible. However, problems can occur because of misaligned data and data
types that are not supported under HP Fortran. For example, HP FORTRAN 77™ permits misaligned
data, especially when working with the structure extension. Also, HP FORTRAN 77™ accepts
nonstandard representations of logicals. Both examples can result in data files that are incompatible
with HP Fortran.
To resolve problems with incompatible data files, examine the source file of the program that
generated the data file as well as the command line that was used to compile the source file,
following the suggestions discussed in “Object code issues” (page 138).
138 Migrating to HP Fortran