On Wed, Apr 5, 2017 at 1:41 PM, Bernd Edlinger
<bernd.edlin...@hotmail.de> wrote:
> On 04/05/17 17:20, Richard Biener wrote:
>>> Also, wonder if you need to mark all types containing such arrays,
>>> if you couldn't just set that flag in C++ on unsigned char/std::byte
>>> arrays (and on anything with that attribute), have that imply alias set
>>> 0 on it and then let the rest of alias machinery handle aggregate types
>>> containing such fields.
>>
>> Yes, I expected it to work like this (didn't look at the patch yet).

My impression is that this is how GCC 6 worked, but GCC 7 decides to
ignore alias set 0 members.  Is that right?

> I want to allow *only* what the C++ standard requires or what Jason says
> of course :), and not a single bit more, because it suppresses otherwise
> correct optimizations.
>
> So a struct with a std::byte member is not alias_set 0,
> only the std::byte itself is, but an array of std::byte
> is itself typeless_storage, and makes the whole structure
> also typeless_storage

Well, only the array member, not the whole structure, but it may make
sense for GCC to treat the whole structure as such internally.

Jason

Reply via email to