https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103066
--- Comment #10 from Thiago Macieira <thiago at kde dot org> --- You're right that emitting more penalises those who have done their job and written proper code. The problem we're seeing is that such code appears to be the minority. Or, maybe put differently, the bad code is showing up a lot in our benchmarks, especially on very big multi-core and multi-socket systems. "Fixing" the compiler would make a broad update to the industry -- so long as the code is recompiled with new compilers. Fixing the actual code would make it better even if used with old ones. Does anyone have a suggestion on how to get best "bang for buck"? (Biggest benefit for smallest effort) This is a sincere question. I'm not trying to be ironic or sarcastic. How can we help the most, the quickest, for the limited amount of resources we can marshal? Also, and I've been hitting this key for a few years, how can we do better at teaching people how to use the tools at their disposal at the proper way? A very good counter-example is C++11's std::atomic_flag: you MUST NEVER use it (at least until C++20, where it got a test() member).