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

Linker bug with intrinsics?

nurbz
Beginner
390 Views

Hi guys,

I was testing whether intrinsics would speed-up one of my hotspots, and it seems I came across a bug in the linker. It does not crash, it simply never stops (inifinite loop?).

The code is attached, the version of the compiler is 10.0.027 [IA-32], and the command-lines aregiven below. I compile from VS C++.

The problem occured while I changed the way memory is accessed. In the function testi(), you'll see 2 sets of 4 _mm_load_ps() and one _mm_store_ps(). If you revert the comments, i.e. go back to the original memory access, you'll obtain a code that compiles just fine.

If anybody knows what's wrong, please let me know.

Alex

compiler: /GL /c /O3 /Og /Ob2 /Oi /Ot /Oy /GA /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /FD /MD /GS /GR /Fo"Release/" /W3 /nologo /Wp64 /Zi /Gd /Qansi-alias /Qopenmp /QaxP /QxP

linker:/LTCG kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /OUT:"D:CodeOptimisationRelease/Optimisation.exe" /INCREMENTAL:NO /nologo /TLBID:1 /DEBUG /PDB:"D:CodeOptimisationReleaseOptimisation.pdb" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /IMPLIB:"D:CodeOptimisationReleaseOptimisation.lib" /MACHINE:X86 /MANIFEST /MANIFESTFILE:"ReleaseOptimisation.exe.intermediate.manifest" /qipo_fa

0 Kudos
5 Replies
levicki
Valued Contributor I
390 Views

Try this:

  • Remove -Qopenmp switch and see if it works
  • Declare loop counter as volatile and see if it works

If one of those workarounds solve your problem then it is most likely a compiler bug #438934 (broken looop counter code when OpenMP is used) which I submitted on June 22nd, 2007 and which is still in a "Targeted to be fixed" state after 106 days of being open.

The only other thing you could do is test your code with ICC 10.1.011 and see if it works by any chance.

In my opinion it is a shame that support with the word "Premier" in its title takes more than a three months on average only to get from "Reproduced (Escalated)" to "Targeted to be fixed".

0 Kudos
Intel_C_Intel
Employee
390 Views

Hello,

Thanks for the answer. None of your suggestions worked though.

I realized that this actually is a compiler bug, I mentioned the linker because ipo was involved, hence the bug was occuring at link time. But it really is a compiler bug.

And it is a shame that an infinite loop can manage to end up in an Intel product.

0 Kudos
Dale_S_Intel
Employee
390 Views
I have not been able to reproduce the behavior you describe. Whenever I run your program, it fails at line 318 with an unhandled exception. Even when I compiled with just "/Zi /Od" I saw the same failure at line 318.

You mention that you believe the problem is triggered by IPO, but I don't see the /Qipo on your icl command line, only on the link line. I wouldn't expect IPO to be invoked if you don't specify it on the icl command line.

Dale
0 Kudos
Dale_S_Intel
Employee
390 Views
I took the liberty of adding "-Qipo" to the command line you gave, and the compiler seems to be taking an inordinately long time to compile. Is that what you meant?

Of course, I cannot prove whether or not it will halt and some point in the future, but that's academic at this point :-)
I'll investigate and get back to you.

Dale
0 Kudos
Dale_S_Intel
Employee
390 Views
This is working now. If you download the latest version of the compiler from registrationcenter.intel.com this should work now. If you still have problems, please let me know.

Thanks!

Dale
0 Kudos
Reply