Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Default Termination Handling

When a Fortran Console, Fortran QuickWin, or Fortran Standard Graphics application terminates execution, either by normal termination or due to a severe error or exception, the following actions are taken by the Fortran runtime system:

  • Any Open files are closed and the requested DISPOSITION operations are performed.

  • With a QuickWin application, any open QuickWin windows are closed.

  • The C runtime exit() routine is called with the status code to return to the operating system. The C runtime exit() routine will call the Windows API routine ExitProcess to terminate the process. (See crt0dat.c in the C runtime sources).

In a Fortran DLL or Fortran Windows* application, any unhandled I/O programming errors will cause the following actions:

  • Any Open files are closed and the requested DISPOSITION operations are performed.

  • The C runtime exit() routine is called with the status code to return to the operating system. The C runtime exit() routine will call the Windows API routine ExitProcess to terminate the process. (See crt0dat.c in the C runtime sources.)

Any unhandled exceptions that occur in a Fortran DLL or Fortran Windows application will have application dependent behavior. Since there is no Fortran default handler present, the behavior depends on what you provide for a handler. If you do not explicitly provide a handler, the default mechanisms provided in your main program will determine the behavior. In a Fortran Windows* application, the C runtime system will terminate the application.