https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128266

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 66346
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=66346&action=edit
gcc17-pr128266.patch

Untested patch to avoid optimizing the case where argument is & of volatile
object.  If we need to also handle the volatile something * pointers, then we
basically need to kill that whole optimization, as all the stdatomic.h and
<atomic> APIs have volatile quals.  Or make it opt-in or opt-out optimization.

Reply via email to