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

--- Comment #13 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
No, neither for fields nor for the complete object:

struct
__attribute__((aligned(64)))
S {
    int i;
};

void f()
{
    struct S s __attribute__((aligned(1))), *p = &s;
    int *q = &s.i;
    asm("" :: "r"(p), "r"(q));
}

We have -Waddress-of-packed-member, which doesn't apply here.

But that said, even if we did, it was possible to miss the warning, because the
testcase emits hundreds of them and there was '-w' in the initial report.
David, did you somehow configure CSmith to emit attributes it wouldn't emit by
default? Emitting random attributes makes sense for testing error recovery (gcc
shouldn't ICE on nonsensical attribute combinations), but less so for checking
correctness of generated code, as we see here.

Reply via email to