#2403: compile failure with gfortran 10 when using CCTK_PointerTo
Reporter:Roland Haas
Status:open
Milestone:
Version:
Type:bug
Priority:blocker
Component:

Comment (by Roland Haas):

Might be good to have a test case that checks that the return value of the Fortran function returns the same value as the C function would and that the expected pointer shows up in the function’s argument list. To make sure the Fortran compiler still passes just a plain pointer and not something else.

It should since the type(*) construct seems to be explicitly designed to handle C functions that take void* as argument. https://www.ibm.com/support/knowledgecenter/SSAT4T_15.1.4/com.ibm.xlf1514.lelinux.doc/language_ref/assumedtypeobj.html says:

To facilitate the interoperability with formal parameters of type void* in C procedures, assumed-type arguments are introduced in Fortran. Assumed-type arguments are entities that are declared with the TYPE(*) specifier.

‌

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2403/compile-failure-with-gfortran-10-when