Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28446 Discussions

Compiler segfault when using -syntax-only flag in IFX

ereisch
New Contributor II
606 Views
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

0 Kudos
8 Replies
Ron_Green
Moderator
588 Views

I'll get a bug report going on this.

0 Kudos
Ron_Green
Moderator
583 Views

Bug ID CMLPLRLLVM-37047


0 Kudos
Barbara_P_Intel
Moderator
390 Views

This bug when compiling with -syntax-only is fixed in ifx 2023.0.0. It's part of oneAPI HPC Toolkit 2023.0.

Have you downloaded this release yet? It became available in mid-December.

 

0 Kudos
ereisch
New Contributor II
558 Views

Thanks.  Any update on CMPLRIL0-33765 (support req #05030182)?  This is still burning us here.

0 Kudos
Ron_Green
Moderator
544 Views

No movement on CMPLRIL0-33765 (support req #05030182).  I will escalate this issue.

BUT

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.

ereisch
New Contributor II
537 Views

Thanks.

 

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.

0 Kudos
Ron_Green
Moderator
539 Views

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.  

 

0 Kudos
Steve_Lionel
Honored Contributor III
519 Views

The genmod.f90 files are not meant to be used, they are more for a human reference. They often don't represent everything in the generated .mod file.

0 Kudos
Reply