Hello, I think I found a bug in gcc but before I submit it I'd like to have someone look at least briefly on the code to make sure I did not make some silly mistake. *********************************************schnipp*************** struct Foo { long long _foobar; }; struct Foo * foo_instance() { static struct Foo foo; return &foo; } void bar(struct Foo * foo) { __sync_add_and_fetch(&foo->_foobar, 1LL); } int main(int argc, char * argv[]) { struct Foo * foo=foo_instance(); foo->_foobar=argc; bar(foo); return (int)foo->_foobar; } *********************************************schnapp*************** Is there some obvious flaw in my code? My second question is if it makes any sense to submit this bug if it's against gcc version 4.2.4. I still have to use this compiler version but the bug seems to have vanished in version 4.3.3. Is 4.2.4 still maintained? Thanks for your time. Markus