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

Internal compiler error with ifx 2024.0.2

NCarlson
New Contributor I
516 Views

This example triggers an internal compiler error with ifx 2024.0.2

module foo
  interface
    subroutine c_void_func(b) bind(c)
      type(*), intent(in) :: b(*)
    end subroutine
  end interface
contains
  subroutine bar(a)
    character(*), intent(in) :: a(..)
    select rank (a)
    rank (0)
      call c_void_func([a])
    end select
  end subroutine
end module

$ ifx -c intel-20240327.f90
            [...]
intel-20240327.f90(31): error #5623: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.
       call c_void_func([a])
------------------------^
compilation aborted for intel-20240327.f90 (code 3)

The example also fails with ifort from 2024.0.2, but with an error message that doesn't seem to be of the usual kind, as it appears to expose internal compiler details:

intel-20240327.f90(31): error #5529: CHARACTER variable 'A' has no length argument in routines with C or STDCALL attribute
call c_void_func([a])

0 Kudos
1 Solution
Ron_Green
Moderator
130 Views

@NCarlson Both of these did have the same root cause.  We have a fix, and I've confirmed the fix for both test cases.  Unfortunately this fix did not make the code freeze for 2024.2 (Update 2) due in July. 

This fix will appear in version 2025.0 sometime this fall in quarter 4 2024.  

View solution in original post

5 Replies
NCarlson
New Contributor I
507 Views

Actually the problem doesn't seem to related to type(*).  Here's a simpler example that doesn't ICE, but does produce a bogus error like ifort did on the original example:

 

module foo
contains
  subroutine bar(a)
    character(*), intent(in) :: a(..)
    select rank (a)
    rank (0)
      print *, len(a)
    end select
  end subroutine
end module

intel-20240327.f90(7): error #5529: CHARACTER variable 'A' has no length argument in routines with C or STDCALL attribute
           print *, len(a)
-------------------^

0 Kudos
Ron_Green
Moderator
466 Views

I wonder if this is one bug or 2.  We will get them both into a single bug report and see if they are same.

0 Kudos
Ron_Green
Moderator
447 Views

bug ID is CMPLRLLVM-57245

I may have to split this out to 2 bug reports if the 2nd case does not have same root cause as first. I do see the similarity so I am 90% sure we'll find the same root cause for both.


0 Kudos
Ron_Green
Moderator
131 Views

@NCarlson Both of these did have the same root cause.  We have a fix, and I've confirmed the fix for both test cases.  Unfortunately this fix did not make the code freeze for 2024.2 (Update 2) due in July. 

This fix will appear in version 2025.0 sometime this fall in quarter 4 2024.  

NCarlson
New Contributor I
113 Views
0 Kudos
Reply