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

Internal compiler error with ifx 2024.0.2

NCarlson
Novo colaborador I
1.333 Visualizações

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 Solução
Ron_Green
Moderador
947 Visualizações

@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.  

Ver solução na publicação original

5 Respostas
NCarlson
Novo colaborador I
1.324 Visualizações

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)
-------------------^

Ron_Green
Moderador
1.283 Visualizações

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.

Ron_Green
Moderador
1.264 Visualizações

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.


Ron_Green
Moderador
948 Visualizações

@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
Novo colaborador I
930 Visualizações
Responder