http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46914
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2010-12-12 20:51:40 UTC --- I cannot reproduce this on anything from current 4.4 branch to mainline (with <atomic>). I get: a = 0x603010 *a = 10 ptr = 0x603010 *ptr 10 b = 0x603030 *b = 11 x.exchange(b) = 0x603010 ptr = 0x603030 *ptr 11 c = 0x603050 *c = 12 x.exchange(c) = 0x603030 ptr = 0x603050 *ptr 12