_gfortran_caf_init (The GNU Fortran Compiler)

#### 7.2.1 `_gfortran_caf_init` — Initialization function ¶

Synopsis:

  `void _gfortran_caf_init (int *argc, char ***argv)`

Description:

  This function is called at startup of the program before the Fortran main program, if the latter has been compiled with `-fcoarray=lib`. It takes as arguments the command-line arguments of the program. It is permitted to pass two `NULL` pointers as argument; if non-`NULL`, the library is permitted to modify the arguments.

Arguments:

  argc | intent(inout) An integer pointer with the number of arguments passed to the program or `NULL`.
  argv | intent(inout) A pointer to an array of strings with the command-line arguments or `NULL`.

Notes:

  The function is modelled after the initialization function of the Message Passing Interface (MPI) specification. Due to the way coarray registration works, it might not be the first call to the library. If the main program is not written in Fortran and only a library uses coarrays, it can happen that this function is never called. Therefore, it is recommended that the library does not rely on the passed arguments and whether the call has been done.