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

--- Comment #11 from Wilco <wilco at gcc dot gnu.org> ---
(In reply to Niall Douglas from comment #10)
> (In reply to Jakub Jelinek from comment #9)
> > (In reply to Wilco from comment #8)
> > > Yes that sounds like a reasonable approach.
> > 
> > I don't think so.  Not all variables on which __atomic_* intrinsics are used
> > are actually _Atomic, the vars can be embedded in const aggregates etc.
> 
> I'd have the attribute propagate to enclosing types, like over-alignment.

Yes, a structure with a 128-bit Atomic type in a subfield/union would be forced
to rwdata.

And arbitrary casts (eg. from char* to an atomic type) wouldn't work due to
Atomics requiring strict alignment. A 128-bit atomic type might have a higher
alignment than a 128-bit integer so even casting that seems questionable.

Reply via email to