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

--- Comment #10 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
> atomic_cmpxchg_func tries to cast 'dest' from uint8_t* to int*

I made a typo here, I meant uint32_t rather than uint8_t, and there's no
aliasing violation here as signedness difference is explicitly OK.

It doesn't matter if the function in user code is named cmpxchg or dsjfhg,
whether gcc can emit a more efficient bytewise CAS is irrelevant when the user
complains that PRE is miscompiling their code.

uint8_t is obviously a character type in this particular testcase (as well as,
fwiw, on all Glibc targets)

OTOH that cmpxchg_using_helper does not return a value is a serious problem,
that is undefined behavior in C++. You'll need to submit a valid testcase
without that issue.

Reply via email to