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

internal compiler error with __int128 and range switch case

mrjones69
Beginner
602 Views

Hello,

We found an internal compiler error using the Intel C++ 2022.1.0.

The bug occurs when you combine the use of gcc extensions __int128 and a switch case using the range (...) notation.

I have attached a trivial program that demonstrates the error.

You get this output from the compiler:

": internal error: 20000_0

compilation aborted for t.cpp (code 4)

 

This same code compiles and executes correctly using gcc or clang.

 

Thank you.

0 Kudos
1 Solution
SantoshY_Intel
Moderator
574 Views

Hi,

 

Thank you for posting in Intel Communities.

 

We were able to reproduce your issue using the Intel classic compilers(icc & icpc).

SantoshY_Intel_2-1657187204379.png

 

However, we can compile the code successfully using the Intel oneAPI DPC++/C++ compilers(icx, icpx & dpcpp) as shown below:

SantoshY_Intel_1-1657187186046.png

 

So, we recommend you to use Intel oneAPI DPC++/C++ compilers(icx, icpx & dpcpp).

 

If this resolves your issue, make sure to accept this as a solution. This would help others with a similar issue. Thank you!

 

Best Regards,

Santosh

 

 

View solution in original post

3 Replies
SantoshY_Intel
Moderator
575 Views

Hi,

 

Thank you for posting in Intel Communities.

 

We were able to reproduce your issue using the Intel classic compilers(icc & icpc).

SantoshY_Intel_2-1657187204379.png

 

However, we can compile the code successfully using the Intel oneAPI DPC++/C++ compilers(icx, icpx & dpcpp) as shown below:

SantoshY_Intel_1-1657187186046.png

 

So, we recommend you to use Intel oneAPI DPC++/C++ compilers(icx, icpx & dpcpp).

 

If this resolves your issue, make sure to accept this as a solution. This would help others with a similar issue. Thank you!

 

Best Regards,

Santosh

 

 

mrjones69
Beginner
561 Views

Thank you!

We had not used the Intel compiler for many years and used icpc out of habit without understanding there were newer versions (icpx).

We updated our build to use icpx and it compiles perfectly now.

 

0 Kudos
SantoshY_Intel
Moderator
547 Views


Hi,


Thanks for accepting our solution. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks & Regards,

Santosh



0 Kudos
Reply