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

Getting "error #5623: **Internal compiler error" on Fortran code with ifx compiler

sleepyapple
Beginner
647 Views

Hi,

 

I was trying to compile a test purpose Fortran code, which is aimed to use a nested module or submodule:

 

module inference_engine_m
  implicit none

  character(len=*), parameter :: key(*) = [character(len=len("usingSkipConnections")) :: &
    "modelName", "modelAuthor", "compilationDate", "activationFunction", "usingSkipConnections"]

  interface inference_engine_t
    module function construct_from_json()
      implicit none
      integer construct_from_json
    end function
  end interface
end module inference_engine_m

submodule(inference_engine_m) inference_engine_s
  implicit none
contains
  module procedure construct_from_json
  contains
    function get_key_value(line)
      character(len=*) line
      integer get_key_value
      associate(text_after_colon => line(index(line, ':')+1:))
        associate(opening_value_quotes => index(text_after_colon, '"'))
        end associate
      end associate
    end function
  end procedure construct_from_json
end submodule inference_engine_s

 

Before line 14 is the module declared for block starts after line 14 to use:

And it gives me error of Internal compiler:

 

././src/inference_engine.f90(21): 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.
      character(len=*) line
--------------------^
compilation aborted for ././src/inference_engine.f90 (code 3)
<ERROR> Compilation failed for object " src_inference_engine.f90.o "
<ERROR> stopping due to failed compilation
STOP 1

 

When I tried to remove lines 24 - 25 in above code like: 

 

module inference_engine_m
  implicit none

  character(len=*), parameter :: key(*) = [character(len=len("usingSkipConnections")) :: &
    "modelName", "modelAuthor", "compilationDate", "activationFunction", "usingSkipConnections"]

  interface inference_engine_t
    module function construct_from_json()
      implicit none
      integer construct_from_json
    end function
  end interface
end module inference_engine_m

submodule(inference_engine_m) inference_engine_s
  implicit none
contains
  module procedure construct_from_json
  contains
    function get_key_value(line)
      character(len=*) line
      integer get_key_value
      associate(text_after_colon => line(index(line, ':')+1:))
        !associate(opening_value_quotes => index(text_after_colon, '"'))
        !end associate
      end associate
    end function
  end procedure construct_from_json
end submodule inference_engine_s

 

Then, the compilation can pass without error.  I have no idea why it happens. The ifx version is:

ifx (IFX) 2023.1.0 20230320

It is my first time to report compiler bugs, please let me know if any other information is needed.  

 

Labels (2)
5 Replies
Barbara_P_Intel
Moderator
623 Views

I duplicated the internal compiler error (ICE). The compiler shouldn't do that.

I also got warning messages. Did you see these? Can you fix these warnings? Maybe you can get past the ICE by eliminating those warnings.

$ ifx -c sleepy.f90
sleepy.f90(20): warning #6178: The return value of this FUNCTION has not been defined.   [GET_KEY_VALUE]
    function get_key_value(line)
-------------^
sleepy.f90(23): warning #6178: The return value of this FUNCTION has not been defined.   [CONSTRUCT_FROM_JSON]
      associate(text_after_colon => line(index(line, ':')+1:))
^

Congratulations! You provided good information on your issue.

0 Kudos
Barbara_P_Intel
Moderator
595 Views

I filed a bug report on the ICE, CMPLRLLVM-49861. I'll let you know when it's fixed.



0 Kudos
sleepyapple
Beginner
582 Views

Thanks Barbara,

 

I edited code a bit to pass the warnings like:

module inference_engine_m
  implicit none
  character(len=*), parameter :: key(*) = [character(len=len("usingSkipConnections")) :: &
    "modelName", "modelAuthor", "compilationDate", "activationFunction", "usingSkipConnections"]
  interface inference_engine_t
    module function construct_from_json() result(inference_engine)
      implicit none
      integer inference_engine
    end function
  end interface
end module inference_engine_m

submodule(inference_engine_m) inference_engine_s
  implicit none
contains
  module procedure construct_from_json
  contains
    function get_key_value(line) result(value_)
      character(len=*), intent(in) :: line
      integer value_
      associate(text_after_colon => line(index(line, ':')+1:))
        associate(opening_value_quotes => index(text_after_colon, '"'))
          value_ = -1
        end associate
      end associate
    end function
  end procedure construct_from_json
end submodule inference_engine_s

But I still get the same #5623 error. Thanks again for your suggestion!

0 Kudos
Barbara_P_Intel
Moderator
400 Views

The internal compiler error (ICE) that you reported with the first reproducer is fixed in the ifx compiler that was released this week. However, the error you reported with the second reproducer will be fixed in the next release currently planned for early Q2 2024.



0 Kudos
Barbara_P_Intel
Moderator
160 Views

The ICE you reported here is fixed in ifx 2024.1.0 that was released last week. Please try it!



0 Kudos
Reply