HP Fortran Programmer Guide (766160-001, March 2014)

10 Migrating to HP Fortran
A major feature of HP Fortran is its compatibility with standard-conforming HP FORTRAN 77. Both
source files and object files from existing HP FORTRAN 77 applications can be migrated to HP
Fortran with comparatively little effort. However, some command-line options and nonstandard
extensions in HP FORTRAN 77 programs may have to be changed to compile and execute correctly
under HP Fortran.
To smooth the migration path, HP Fortran includes a number of extensions that are compatible
with HP FORTRAN 77. HP Fortran also includes extensions that are designed to ease the job of
porting applications from other vendors' Fortran dialects. For a summary list of all HP Fortran
extensions, see the HP Fortran Programmer's Reference. For information about porting other vendors
Fortran programs to HP Fortran, see “Porting to HP Fortran” (page 141).
This chapter discusses the following topics:
Incompatibilities with HP FORTRAN 77
Migration issues
Approaches to migration
Incompatibilities with HP FORTRAN 77
The following sections describe known incompatibilities between HP Fortran and HP FORTRAN
77. These incompatibilities include both source-level and object-code incompatibilities. A subset
of these are detected by the HP fid tool, which is described in “Fortran incompatibilities detector
(page 139).
Compiler limits
HP Fortran supports format field widths up to 32767. HP FORTRAN 77 allows format field widths
up to 2147483639, which is close to 2*31.
Command-line options not supported
The HP Fortran compiler does not accept the f77command-line options listed in Table 10-1, and
the f77 options listed in Table 10-2 have been renamed for f90. In addition, HP Fortran code
may not link correctly with HP FORTRAN 77 object files that were compiled with these options;
see “Object code issues” (page 138).
Table 37 f77 options not supported by f90
+N+e+800
+R+I[2|4]+A
+U+L8+A3
-w66-+LA+A8
-lisam+apollo
+mr+E
Table 38 f77 options replaced by f90 options
f90 replacementf77 option
+langlvl
a
-A
+langlvl
a
-a
+autodbla+autodblpad
+escape+B
Incompatibilities with HP FORTRAN 77 131