https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114286
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2024-03-15
Status|UNCONFIRMED |NEW
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Doesn't seem to be _BitInt related,
struct S { long long a[16]; } s;
struct S
foo (void)
{
struct S r;
__atomic_load (&s, &r, __ATOMIC_RELAXED);
return r;
}
ICEs the same way. Guess analyzer doesn't handle properly atomic_load which
can't be optimized into the 1/2/4/8/16 byte variants and is handled by
libatomic.
Makes me wonder about other __atomic operations on such types, __atomic_store,
__atomic_exchange and __atomic_compare_exchange on such types.
And to answer my question,
void
bar (struct S x)
{
__atomic_store (&s, &x, __ATOMIC_RELAXED);
}
doesn't ICE,
struct S
baz (struct S x)
{
struct S r;
__atomic_exchange (&s, &x, &r, __ATOMIC_RELAXED);
}
does and
int
qux (struct S *e, struct S *d)
{
return __atomic_compare_exchange (&s, e, d, 0, __ATOMIC_RELAXED,
__ATOMIC_RELAXED);
}
doesn't.