MODULE TEST INTERFACE MODULE SUBROUTINE REGISTER_NEW_CALLBACK ( FCN, PREEMPT ) BIND(C) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE TYPE(C_FUNPTR), VALUE, INTENT(IN) :: FCN LOGICAL(KIND=C_BOOL), VALUE, INTENT(IN) :: PREEMPT END SUBROUTINE REGISTER_NEW_CALLBACK END INTERFACE END MODULE TEST
Parse file with "ifx -syntax-only ifx_err.f90", and the compiler crashes.
Using version 2022.0.0 Build 20211123
No movement on CMPLRIL0-33765 (support req #05030182). I will escalate this issue.
IFX correctly compiles and creates the genmod files. And as you may know, the binaries, genmods, etc are completely compatible between ifort and ifx. You can use IFX for this or other files that need an interface created.
Unfortunately, ifx doesn't yet support a few of the ifort flags we require to run our code: "-no-global-hoist", "-prec-div", and "-prec-sqrt". Additionally, the "-sox" and "-fp-stack-check" flags are nice-to-have flags that also don't seem to be implemented yet. So we cant' move completely to "ifx" for the entire build process; however, as you note I may be able to put in a workaround to have "ifx" create the module files (using "-s" instead of "-syntax-only", and then deleting the assembler files) and then using ifort to generate the actual object files. We seem to be hitting the ifx crash whenever "-syntax-only" is passed on the command line and it is syntax-checking a F90 module.
Interestingly, when I build all of the Fortran source with "ifx" and then try linking, I get an obscure error from the linker:
ld: /path/to/executable: version node not found for symbol test@register_new_callback__. ld: failed to set dynamic section sizes: Bad value
(This assumes the original f90 definition used above, along with the following notional body:
SUBMODULE (TEST) REGISTER_NEW_CALLBACK__ CONTAINS MODULE PROCEDURE REGISTER_NEW_CALLBACK USE, INTRINSIC :: ISO_C_BINDING ... <routine body> ... END PROCEDURE REGISTER_NEW_CALLBACK END SUBMODULE REGISTER_NEW_CALLBACK__
Thanks for the suggestion.
I might have spoken too soon - looking at the genmod f90 file - it seems to capture the old STRUCTURE declarations but it does not have the UNION and MAP for /AA_ARRAY/ that your input source has. So not sure that interface created by IFX will work. Have a look at the genmod created by IFX. /AA_ARRAY/ seems to be the only STRUCTURE with UNION and MAP.