Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
27153 Discussions

Compiler segfault when using -syntax-only flag in IFX

ereisch
Novice
166 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
7 Replies
Ron_Green
Moderator
148 Views

I'll get a bug report going on this.

Ron_Green
Moderator
143 Views

Bug ID CMLPLRLLVM-37047


ereisch
Novice
118 Views

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

Ron_Green
Moderator
104 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
Novice
97 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.

Ron_Green
Moderator
99 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.  

 

Steve_Lionel
Black Belt Retired Employee
79 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.

Reply