
30 Mar
2010
30 Mar
'10
8:47 a.m.
On Tue, 30 Mar 2010, Khiszinsky, Maxim wrote:
Another example of MSVC optimization error for x86 - see my class cds::lock::RecursiveSpinT: void acquireLock() { // TATAS algorithm while ( !tryAcquireLock() ) { while ( m_spin.template load<membar_relaxed>() ) { backoff() ; // VC++ 2008 bug: the compiler generates infinite loop for int64 m_spin.
this is not a bug; the compiler is simply allowed to assume that the value of a variable does not change intermittently Regards Helge