In the original case, keeping the optimisation at -O3 we also generated disassembly for the version with and without the flag assignment. There is one section where it clearly differs and we think the register %esi is not being updated in the broken version but at this level we're really not sure.
I have also attached the two disassembly dumps for reference. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1248606 Title: Compiler optimisation affects reading of flag in thread To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gcc-4.8/+bug/1248606/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs