Table 41 f77 options supported by f90 (continued)

f77 option

f90 option

function

-Q

+nodemand_load

Do not mark linker output demand load

-q

+demand_load

Mark linker output demand load

-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)

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

Page 138
Image 138
HP UX Fortran Software manual Object code issues, Data file issues