https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104200
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW Assignee|pinskia at gcc dot gnu.org |unassigned at gcc dot gnu.org Keywords| |diagnostic --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- waccess is way early where there is almost no optimizations happen. Not going to fix this. Simple testcase: int test_cas_atomic_relaxed_consume_char (char* val, char* foo, char* bar) { int model_s = 0; int model_f = 1; if (model_s < model_f) return 0; if (model_f == 3 || model_f == 4) return 0; return __atomic_compare_exchange_n (val, foo, bar, 0, model_s, model_f); }