Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
7679 Discussions

MSVC 2013 ICC 15.0: interlocked instructions do not make memory barrier for optimization?

Marián__VooDooMan__M
New Contributor II
198 Views
Greetings, I have my own very fast critical section implementation with interlocked intrinsic functions. It seems to be failing. I guess ICC IPO optimizer should invalidate program/variable state when it encounters interlocked intrinsic function, even when they are volatile and not so.
0 Kudos
2 Replies
Light_Intel
Moderator
198 Views

Can you please elaborate what exactly is failing? A test case would do nicely.

Marián__VooDooMan__M
New Contributor II
198 Views
I am using MSVC's functions like "InterlockedIncrement(&m_lock_cnt);" which are opaque so compiler should assume that state was changed. Anyway, it was either a bug in ICC 15, or in my code. However the latest update of ICC 15 is working perfectly, and the problem disappeared. Please, disregard this issue.
Reply