https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105495
--- Comment #4 from Jakub Jelinek ---
The reason why it works in #c1 is that we replace the
c = x_4(D);
n_6 = 2;
n.0_1 = n_6;
n.1_2 = (unsigned int) n.0_1;
__atomic_compare_exchange_4 (p_7(D), &c, n.1_2, 1, 0, 0);
call in the IL with:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105495
--- Comment #3 from LIU Hao ---
Wouldn't that go away if the value in it is never read back?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105495
Richard Biener changed:
What|Removed |Added
Last reconfirmed||2022-05-05
Ever confirmed|0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105495
--- Comment #1 from LIU Hao ---
A possible workaround is to use a scalar type to provide storage for local
variables, and cast them as needed:
Godbolt: https://gcc.godbolt.org/z/n7zq7Pn4G
```c
typedef struct { int b; } cond;
int
__MCF_batch_r