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

Bug in Intel LLVM fortran compiler?

Rubo
Beginner
550 Views

Compiling a regular modern Fortran code I got this error. I am wondering if I hit a bug in the compiler: 

 

LLVM ERROR: Cannot select: 0x8aed4b0: i32 = zero_extend 0x88482e0, /programming/SIMPLE/src/utils/simple_linalg.f90:838:41
0x88482e0: v8i1 = xor 0xafffe70, 0xc261290, /programming/SIMPLE/src/utils/simple_linalg.f90:778:9
0xafffe70: v8i1 = or 0xd8e4270, 0x7d944a0, /programming/SIMPLE/src/utils/simple_linalg.f90:778:9
0xd8e4270: v8i1 = insert_subvector 0xc261680, 0x9cdd490, Constant:i64<0>, /programming/SIMPLE/src/utils/simple_linalg.f90:778:9
0xc261680: v8i1 = BUILD_VECTOR Constant:i8<0>, Constant:i8<0>, Constant:i8<0>, Constant:i8<0>, Constant:i8<0>, Constant:i8<0>, Constant:i8<0>, Constant:i8<0>, /programming/SIMPLE/src/utils/simple_linalg.f90:778:9
0x8848190: i8 = Constant<0>
0x8848190: i8 = Constant<0>
0x8848190: i8 = Constant<0>
0x8848190: i8 = Constant<0>
0x8848190: i8 = Constant<0>
0x8848190: i8 = Constant<0>
0x8848190: i8 = Constant<0>
0x8848190: i8 = Constant<0>
0x9cdd490: v4i1 = setcc 0x7852180, 0xa258910, setugt:ch, .....

0 Kudos
5 Replies
Ron_Green
Moderator
528 Views

there is not enough information here for us to comment or help.

First, what version of IFX? 

What OS?

What application, compiler options, etc.

Ideally we could use a .zip or .tgz of the application or a pointer to it's github location.

0 Kudos
Rubo
Beginner
449 Views

IFX version ifx (IFX) 2024.0.2 20231213

Linux OEL8 Red Hat Enterprise Linux release 8.9 (Ootpa)

Application: https://github.com/hael/SIMPLE

Compilation script: https://github.com/hael/SIMPLE/compile_intel.sh

 

Thanks!!!

0 Kudos
Ron_Green
Moderator
426 Views

I cannot get far enough into the build to see what you are seeing.  Is there a branch you are using?

I also changed the CXX compiler to 'icpx' instead of icx-cc

 

First I hit 

[  4%] Building Fortran object lib/CMakeFiles/SIMPLE3.0.0.dir/utils/simple_rnd.f90.o
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/utils/simple_rnd.f90(36): error #6405: The same named entity from different modules and/or program units cannot be referenced.   [LONG]
integer(long), save :: idum
--------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/utils/simple_rnd.f90(36): error #6683: A kind type parameter must be a compile-time constant.
integer(long), save :: idum
--------^

which looks like it could be a bug reported already.  

So I replaced 'long' with '

selected_int_kind(9)'

which you had as it's kind in defs.  that got me past simple_rnd.f90.  Then I hit a slew of errors 

[  4%] Building Fortran object lib/CMakeFiles/SIMPLE3.0.0.dir/main/simple_ori.f90.o
/tmp/ifx0104453423caFwu4/ifxRXHpL1.i90: error #8262: For a type-bound procedure that has the PASS binding attribute, the first dummy argument must have the same declared type as the type being defined.   [PID]
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(1482): error #6645: The name of the module procedure conflicts with a name in the encompassing scoping unit.   [KILL]
    subroutine kill( self )
---------------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(153): error #6552: The CALL statement is invoking a function subprogram as a subroutine.   [KILL]
        call self%kill
------------------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(153): error #6074: The number of actual arguments does not match the definition.   [KILL]
        call self%kill
------------------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(153): error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface.   [PID]
        call self%kill
-------------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(153): error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface.   [SIGNUM]
        call self%kill
-------------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(1841): error #6552: The CALL statement is invoking a function subprogram as a subroutine.   [KILL]
        call e1%kill
----------------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(1841): error #6074: The number of actual arguments does not match the definition.   [KILL]
        call e1%kill
----------------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(1841): error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface.   [PID]
        call e1%kill
-------------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(1841): error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface.   [SIGNUM]
        call e1%kill
-------------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(1842): error #6552: The CALL statement is invoking a function subprogram as a subroutine.   [KILL]
        call e2%kill
----------------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(1842): error #6074: The number of actual arguments does not match the definition.   [KILL]
        call e2%kill
----------------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(1842): error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface.   [PID]
        call e2%kill
-------------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(1842): error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface.   [SIGNUM]
        call e2%kill
-------------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(1843): error #6552: The CALL statement is invoking a function subprogram as a subroutine.   [KILL]
        call e3%kill
----------------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(1843): error #6074: The number of actual arguments does not match the definition.   [KILL]
        call e3%kill
----------------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(1843): error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface.   [PID]
        call e3%kill
-------------^
/nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90(1843): error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface.   [SIGNUM]
        call e3%kill
-------------^
compilation aborted for /nfs/site/home/rwgreen/projects/simple/SIMPLE/src/main/simple_ori.f90 (code 1)

 

 

0 Kudos
Rubo
Beginner
409 Views

I am using the master branch. This is really interesting,, which is the version of IFX that you are using?

0 Kudos
Rubo
Beginner
344 Views

Ron, I was able to reproduce your error with IFX versions 2023.1.0 and 2023.2.0.

Using IFX 2024.1.0 I got the errors reported initially in my post.

0 Kudos
Reply