Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Assertion failed at "shared/cfe/edgcpfe/ms_lower_name.c"

Wei__Wenjie
Beginner
1,966 Views

Hello,

Our software product is built with MSVC. Now I want to only rebuild the computing module with Intel compiler while other parts are still compiled with MSVC. The computing module consists of three cpp files, and will be built as a .dll file. The following is about compiler versions.

MSVC: Microsoft (R) C/C++ Optimizing Compiler Version 19.23.28107 for x64 (from Visual Studio 2019)

Intel Compiler: Intel(R) 64, Version 19.0.5.281 Build 20190815

During the compilation, there is no any error reported for our source code,  but the compilation eventually ends up with the following error.

 C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.23.28105\include\complex(26): error : assertion failed at: "shared/cfe/edgcpfe/ms_lower_name.c", line 1826.

I have no idea which part of our code triggered this error, any suggestion about how to proceed? Many thanks.

 

0 Kudos
16 Replies
Viet_H_Intel
Moderator
1,966 Views

Can you see how ms_lower_name.c was compiled? then try just to recompile ms_lower_name.c with the same set of options to see if you can reproduce the error. If the same error is seen, then replace /c with /E and provide us its preprocessed file to work with. 

0 Kudos
Wei__Wenjie
Beginner
1,966 Views

Hi, 

"shared/cfe/edgcpfe/ms_lower_name.c" should be the part of the source code of Intel C++ compiler, which is not our code. An assertion failed in compilation, that is all what I know. There seems to be a bug in compiler front-end. No any error was reported for our source code. 

 

 

0 Kudos
Viet_H_Intel
Moderator
1,966 Views

What VS2019 build version you have?

You mentioned only to recompile 3 .cpp files with Intel compiler, can you manually recompile one by one to see which one emits that "assertion failed"?

0 Kudos
Wei__Wenjie
Beginner
1,966 Views

I got this problem when compiling the first file. The file itself is just for scientific computing, it however depends on lots of other headers. I feel difficult because there is no more information dumped by icc to let me know which part of our codes triggered this bug. It just directly gave me this error. Do you have way to show more information?

0 Kudos
Wei__Wenjie
Beginner
1,966 Views

Compilation command is as follows.

D:\Applications\IntelSWTools\compilers_and_libraries_2019\windows\bin\Intel64\icl.exe /c /Qm64 /I..\..\..\Include /I..\..\..\..\..\..\Include /I..\..\..\Include\Thermo /I..\StdThermo /IC:\VLD\include /Zi /nologo /W4 /O2 /Oi /Qipo /D __INTEL_COMPILER=1900 /D PROTOBUF_USE_DLLS /D WIN32 /D NDEBUG /D _WINDOWS /D _USRDLL /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING /D THERMOTABLEPACKAGE_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /EHsc /MD /GS /Gy /arch:CORE-AVX2 /fp:fast /Zc:wchar_t /Zc:forScope /std:c++latest /Fo"x64\Release\\" /Fd"x64\Release\vc142.pdb" /TP /FC /Zc:throwingNew ThermoTable.cpp

 

The following is the full out of icc:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.23.28105\include\complex(26): internal error: assertion failed at: "shared/cfe/edgcpfe/ms_lower_name.c", line 1826

      float _Val[2];
                ^

compilation aborted for ThermoTable.cpp (code 4)

 

It seems icc has an issue related to C++ standard library header files of MSVC.

0 Kudos
Viet_H_Intel
Moderator
1,966 Views

Can you run this command for ThermoTable.cpp directory?

D:\Applications\IntelSWTools\compilers_and_libraries_2019\windows\bin\Intel64\icl.exe /E /Qm64 /I..\..\..\Include /I..\..\..\..\..\..\Include /I..\..\..\Include\Thermo /I..\StdThermo /IC:\VLD\include /Zi /nologo /W4 /O2 /Oi /Qipo /D __INTEL_COMPILER=1900 /D PROTOBUF_USE_DLLS /D WIN32 /D NDEBUG /D _WINDOWS /D _USRDLL /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING /D THERMOTABLEPACKAGE_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /EHsc /MD /GS /Gy /arch:CORE-AVX2 /fp:fast /Zc:wchar_t /Zc:forScope /std:c++latest /Fo"x64\Release\\" /Fd"x64\Release\vc142.pdb" /TP /FC /Zc:throwingNew ThermoTable.cpp > ThermoTable.i

 

And provide us ThermoTable.i 

0 Kudos
Wei__Wenjie
Beginner
1,966 Views

Hi,

I have written a very simple code that can reproduce this issue. Please create a file called test.cpp, which has the following content. Then compile it with "icl /c /O2 /std:c++latest test.cpp". Library "unicode" comes by running "git clone https://github.com/unicode-org/icu.git".

 

// File start //

#include <complex>
#include "unicode/unistr.h"

//#include "icu/icu4c/source/common/unicode/unistr.h"  // If you run git clone at the folder where test.cpp stays.

using U_ICU_NAMESPACE::UnicodeString;

inline const UnicodeString KernelMessageBundle = UNICODE_STRING_SIMPLE("KernelMessageBundle");

// File end //

 

 

0 Kudos
Viet_H_Intel
Moderator
1,966 Views

Can you run "icl /E /O2 /std:c++latest test.cpp > test.i" and provide us test.i? 

0 Kudos
Wei__Wenjie
Beginner
1,966 Views

Yes, please find the attached file "test.i".

0 Kudos
Viet_H_Intel
Moderator
1,966 Views

Thank you. I'll take a look and keep you posted.

0 Kudos
Viet_H_Intel
Moderator
1,966 Views

I've created an internal CMPLRIL0-32285 to track this bug. 

0 Kudos
Wei__Wenjie
Beginner
1,966 Views

Do you have any progress?

0 Kudos
Viet_H_Intel
Moderator
1,966 Views

As up now, I dont have any update.

0 Kudos
Knapp__Jacob
Novice
1,966 Views

Hello,

I have been running into the same problem. I managed to track it down to a small code snippet that triggers it (though it goes off/crashes at line 489 of the MSVC <string> header, not in the <complex> header).

For my own convenience, I did this within Microsoft Visual Studio, where the only changes I made compared to the default project configuration was to switch it to the Intel compiler (so, yours) and go to Properties -> C/C++ -> Language -> C++ Language Standard and set that to /std:c++17. However, it did work (set off the error) with as little as doing `icl IntelCompilerError.cpp /std:c++17`, so... yeah.

 

...I hope this helps y'all track down the error!

0 Kudos
Knapp__Jacob
Novice
1,966 Views

Update:

It seems to specifically be doing "inline const static" for a string that causes it, though the error won't necessarily occur in the <string> header.

See attached. (I also attached the normal one again, just-in-case the upload messed up on the first post - which I can't see yet, because it hasn't been approved.)

(Once again, the only extra commands needed is the singular "/std:c++17" argument)

0 Kudos
AckoftOvak
Beginner
1,966 Views
Any progress? I cannot use Intel compiler because of this bug. Can somebody please take a look at line 1826 in "shared/cfe/edgcpfe/ms_lower_name.c"? Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.0.166 Build 20191121
0 Kudos
Reply