This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/35396] possible incorrect optimization due to missed dependency



------- Comment #3 from hjl dot tools at gmail dot com  2008-07-07 19:00 -------
The testcase is invalid. Please try

#define DECL_CMPSWP(S,T,X) \
static inline T machine_cmpswp##S (volatile void *ptr, T value, T comparand ) \
{ \
    T result; \
              \
    __asm__ __volatile__("lock\ncmpxchg" X " %2,%1" \
                         : "=a"(result), "=m"(*(T *)ptr) \
                         : "q"(value), "m" (*(T *)ptr), "0"(comparand)); \
    return result; \
}


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35396


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]