https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102566
--- Comment #33 from Marko Mäkelä ---
When it comes to toggling the most significant bit, std::atomic::fetch_xor()
could be translated to LOCK XADD which would be able to return all bits:
#include
uint32_t toggle_by_add(std::atomic& a)
{
ret
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107456
--- Comment #2 from Marko Mäkelä ---
Sorry for the noise. I posted a variant of the program to
https://github.com/llvm/llvm-project/issues/58685 and g++-12 is already
emitting the optimal code. Example:
#include
bool lock_add_sete(std::atomic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107462
Bug ID: 107462
Summary: Missed optimization of std::atomic::fetch_xxx "null
operations" to std::atomic::load()
Product: gcc
Version: 12.2.0
Status: UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107456
Bug ID: 107456
Summary: std::atomic::fetch_xxx generate LOCK CMPXCHG instead
of simpler LOCK instructions
Product: gcc
Version: 12.2.0
Status: UNCONFIRMED
Seve
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102566
Marko Mäkelä changed:
What|Removed |Added
CC||marko.makela at mariadb dot com
--- Comm
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98669
--- Comment #13 from Marko Mäkelä ---
Thank you. I have reported this upstream:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=980110
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98669
--- Comment #2 from Marko Mäkelä ---
I cannot reproduce this with Debian's gcc-9 package on my system:
Architecture: amd64
Version: 9.3.0-20
gcc-9 -fsanitize=address crypt.c -lcrypt && ./a.out
sasWQy9ecMDEs
If I change the invocation to gcc or
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98669
Bug ID: 98669
Summary: SIGSEGV on pc=0 in crypt() with -fsanitize=address
Product: gcc
Version: 10.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Componen