[Patch, Fortran] C prototypes for functions returning C function pointers

Thomas Koenig tkoenig@netcologne.de
Mon Mar 24 21:28:04 GMT 2025


Hi Harald,

> the attached patch contains a chunk changing resolve.cc
> that is neither described in the suggested commit message,
> and it fails to compile here:
> 
> ../../gcc-trunk/gcc/fortran/resolve.cc: In function 'void
> check_c_funptr_assign_interface(gfc_expr*, gfc_expr*)':
> ../../gcc-trunk/gcc/fortran/resolve.cc:12248:48: error: 'gfc_expr' {aka
> 'struct gfc_expr'} has no member named 'is_c_interop'
> 12248 |   if (rhs->expr_type != EXPR_FUNCTION || !rhs->is_c_interop)
>        |                                                ^~~~~~~~~~~~
> 
> Can you please check whether you inadvertently added something
> that was not planned or tested?

I sent out the wrong version of the patch, sorry (one which contained
an intermediate stage of something I tried, and then abandoned).

Here is the one that actually in my tree, and that I regression-tested.

Best regards

	Thomas


-------------- next part --------------
A non-text attachment was scrubbed...
Name: p-funptr.diff
Type: text/x-patch
Size: 1971 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/fortran/attachments/20250324/b2a8c89e/attachment-0001.bin>


More information about the Fortran mailing list