Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
E77790.pdf
Скачиваний:
2
Добавлен:
16.05.2024
Размер:
1.29 Mб
Скачать

5.4 Additional Notes About Migrating to the f95 Compiler

5.4Additional Notes About Migrating to the f95 Compiler

The floatingpoint.h header file replaces f77_floatingpoint.h, and should be used in source programs as follows:

#include "floatingpoint.h"

Header file references of the form f77/filename should be changed to remove the f77/ directory path.

Some programs utilizing non-standard aliasing techniques (by overindexing arrays, or by overlapping Cray or Fortran pointers) may benefit by compiling with the appropriate - xalias flag. See “3.4.111 –xalias[=keywords]” on page 104.

5.5The f77 Command

Oracle Developer Studio software no longer includes a separate FORTRAN 77 compiler, f77. Recent releases migrated many FORTRAN 77 features into the Fortran 95 compiler, f95. Much of the functionality of the legacy FORTRAN 77 compiler is now available with the Fortran 95 compiler. Current Oracle Developer Studio compiler releases provide an f77 script, which calls the f95 compiler with an appropriate set of default options. Invoking f77 is equivalent to:

f95 -f77 -ftrap=%none

If it is necessary to link to library routines that were compiled with a previously released f77 compiler, add -xlang=f77 to the command line. However, if you are compiling and linking in separate steps and explicitly specify -xlang=f77, or -lM77, or -lF77, or -lsunmath, you must link with f95 (or the f77 script) and not with cc or CC. If you are also compiling with the -fast flag, add -ftrap=%none after -fast to retain FORTRAN 77's trapping behavior on arithmetic exceptions since -fast sets the trapping mode to "common".

f77 -fast -ftrap=%none

Invoking the f77 script issues a message to alert you to the fact that you are using the f95 compiler in -f77 compatibility mode. You can disable this message by adding - errtags=INVOKE to the command line. See “3.4.22 –f77[=list]” on page 64 for more information.

Chapter 5 • FORTRAN 77 Compatibility: Migrating to Oracle Developer Studio Fortran

205

206 Oracle Developer Studio 12.6: Fortran User's Guide • July 2017

Соседние файлы в предмете Информационные и сетевые технологии