2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
6 .. index:: C_FUNLOC, pointer, C address of procedures
10 C_FUNLOC --- Obtain the C address of a procedure
11 ************************************************
13 .. function:: C_FUNLOC(x)
15 ``C_FUNLOC(x)`` determines the C address of the argument.
18 Interoperable function or pointer to such function.
21 The return value is of type ``C_FUNPTR`` and contains the C address
25 Fortran 2003 and later
31 .. code-block:: fortran
36 .. code-block:: fortran
42 subroutine sub(a) bind(c)
52 subroutine my_routine(p) bind(c,name='myC_func')
54 type(c_funptr), intent(in) :: p
57 call my_routine(c_funloc(sub))
64 :ref:`C_F_PROCPOINTER`