https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96019
--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> So AFAIU
>
> int main(int argc, char *argv[]) {
> uint8_t raw[] = { 0xaa, 0xbb, 0xcc, 0xdd, 0x11, 0x22 };
> SS instance;
> memcpy (&instance, raw, sizeof (SS));
> printf("%x, %x\n", instance.a, instance.b);
> return 0;
> }
>
> would be OK(?)
Yes, this should work once the patch (or a variant thereof) I posted some time
ago to make memcpy a storage order barrier is installed. :-)