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

Possible C compiler bug

Götz_W_
Beginner
307 Views

Hello everyone, the attached test program gives wrong results when compiled with -O1 using the compiler versions 12.1.1, 12.1.6, 13.1.3, or 14.0.1 while it produces the expected results with gcc 4.4.7. The code was distilled from a physics simulation that does a lot of matrix operations. In this test program, a pointer to a nested structure of doubles is passed to a function that modifies these doubles. It seems the wrong operands are used here.

0 Kudos
2 Replies
reinhold-bader
New Contributor II
307 Views

I've also reproduced this behaviour with 14.0.2. The problem in the test case only surfaces with -O1 (not with default optimization or higher), but the code authors tell me that the production code (which is not suitable as a test case) also produces wrong results with -O2 (fwiw).

Best wishes

Reinhold

0 Kudos
KitturGanesh
Employee
307 Views

Hi folks,
  Yes, this is a bug and I will file this issue with our developers and keep you updated. Appreciate your patience till then.
_Regards,
Kittur .

0 Kudos
Reply