- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I filed a bug report on the ICE, CMPLRLLVM-49861. I'll let you know when it's fixed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The ICE you reported here is fixed in ifx 2024.1.0 that was released last week. Please try it!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page