*PING*
Tobias Burnus wrote:
TS29113 allows also non interoperable procedures with
c_funloc/c_f_procpointer; hence, this patch allows them with
-std=f2008ts:
"The function C F PROCPOINTER from the intrinsic module ISO C BINDING
has the restriction in ISO/IEC 1539-1:2010 that CPTR and FPTR shall
not be the C address and interface of a noninteroperable Fortran
procedure.
"The function C FUNLOC from the intrinsic module ISO C BINDING has the
restriction in ISO/IEC 1539-1:2010 that its argument shall be
interoperable.
"These restrictions are removed."
Additionally, I changed "parameter" to "argument" and added a
diagnostic that the first argument to c_f_pointer/c_f_procpointer is
the correct one - before both accepted c_ptr and c_funptr.
Build and regtested on x86-64-linux.
OK for the trunk?
Tobias
PS: For c_loc/c_f_pointer a similar restriction has been removed.
However, to fix c_loc is more complicated as the current
implementation has several rejects-valid/wrong-code bugs (cf. the
existing PRs). For the full to-do list of TS29113, see
http://gcc.gnu.org/ml/fortran/2012-07/msg00115.html