https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69407
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> --- The fix is as easy as --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -11443,6 +11443,8 @@ resolve_overloaded_builtin (location_t loc, tree function, && orig_code != BUILT_IN_ATOMIC_STORE_N) result = sync_resolve_return (first_param, result, orig_format); + TREE_USED (result) = 1; + /* If new_return is set, assign function to that expr and cast the result to void since the generic interface returned void. */ if (new_return) but I've yet to see if this PR is just about __atomic_fetch_OP and __atomic_OP_fetch intrinsics or even about the rest.