Hi,
Here is a minimal reproducible example (MRE) for some code which generates an ICE due to the length of the name of the module and sub-module exceeding the internal buffer inside ifort.
Module A_Very_Long_Module_Name_Composed_Of_Many_Characters
implicit none
interface
module subroutine DoSomething()
end subroutine
end interface
End Module
SubModule(A_Very_Long_Module_Name_Composed_Of_Many_Characters) A_Long_Submodule_Composed_Name_Of_Many_Char
implicit none
contains
module procedure DoSomething
end procedure
End SubModule
Compiling this code using:
module load --silent compiler/latest
ifort --version
ifort Main.F90 -c
gives
ifort (IFORT) 2021.5.0 20211109
Copyright (C) 1985-2021 Intel Corporation. All rights reserved.
Main.F90: catastrophic error: **Internal compiler error: Creating this name exceeds internal buffer: a_very_long_module_name_composed_of_many_characters@a_long_submodule_composed_name_of_many_char._
compilation aborted for Main.F90 (code 1)
If the name of the sub-module is shorten by a single character (for example, by removing the final "r" letter) the compilation succeeds. It seems that a maximum length of 96 character is used internally by ifort for the combined length of a module and sub-module.
Would it be possible to increase this number of a higher value in the nest release of the compiler?
The motivation for this request if the following. In our real case scenario we are using some code generation techniques to automatically create module/sub-module names. So, we don't have (an easy) control on the length for these names and, in some cases, these names can be quite lengthy.
Thank you.
链接已复制
I'm on Linux, using Fedora 34:
Linux 5.15.12-100.fc34.x86_64 x86_64 x86_64 x86_64 GNU/Linux
MaxPC reports that someone has Windows 11 running on a RPi, just wait till we start getting asked questions about IFX on a RPI.
Do you know how many future programmers are getting their start on the PI --I would be willing to wager that you are wrong and a "lite" version of Fortran will show up on the PI.
it is amazing what people are doing with this machine.
Thank you. May I ask if intel is planning to extend the limit on the number of characters, or you will just fix the ICE and transform it into a regular compile-time error ?
Is code freeze the same as brain freeze when you drink a Slurpee to fast?
Sorry it is the end of a long day and I had a session with the dentist.
Hi,
For you information, the same bug also occurs on the newest ifx compilers. Do you know if the bug will also be fixed for ifx in the future?
Tested the minimal reproducible example by the original poster on the recently released ifx 2023.0.0 and ifort 2021.8.0 versions, and the bug is still there (for both compilers). A pity, since we would very much like our users to be able to use ifx 2023.0.0 for compiling our code, but the bug requires us to drop support for Intel compilers.
I'll note that there is also a platform-dependent limit on the combined length of module and symbol name due to object code limitations. I think on Windows it's 63 characters (including name decoration such as the underscore between module and symbol.) For portability, it's a good idea to not stress this limit.
