https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115882
Bug ID: 115882 Summary: Don't alwsys promote memory_order_consume to memory_order_acquire Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: uis9936 at gmail dot com Target Milestone: --- Unconditional promotion of consume to acquire was temproary fix before C++20 came out. Now(since C++20) definition was changed in P0750R1 and consume no longer discouraged. As I understand compiler don't need to promote it as long as dependency chain never leaves function unless it leaves it with carries_dependency attribute. And dependency can be killed in multiple ways including kill_dependency, logical operator and trenary operator.