Next: _gfortran_caf_this_image, Previous: _gfortran_caf_init, Up: Function ABI Documentation [Contents][Index]

#### 8.2.2 `_gfortran_caf_finish` — Finalization function

Description:

  This function is called at the end of the Fortran main program, if it has been compiled with the `-fcoarray=lib` option.

Syntax:

  `void _gfortran_caf_finish (void)`

NOTES

  For non-Fortran programs, it is recommended to call the function at the end of the main program. To ensure that the shutdown is also performed for programs where this function is not explicitly invoked, for instance non-Fortran programs or calls to the system’s exit() function, the library can use a destructor function. Note that programs can also be terminated using the STOP and ERROR STOP statements; those use different library calls.