_gfortran_caf_finish (The GNU Fortran Compiler)

#### 7.2.2 `_gfortran_caf_finish` — Finalization function ¶

Synopsis:

  `void _gfortran_caf_finish (void)`

Description:

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

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.