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

--- Comment #6 from George Thopas <george.thopas at gmail dot com> ---
(In reply to Eric Botcazou from comment #5)
> Thanks for reporting the problem.

Thanks for the swift fix. It nicely resolves it for the malloc/alloca ... 
It doesn't seem to do anything for the rest of the common idioms however
when I extend  the testcase.

int main()
{
    t_s12 *msg1 = __builtin_alloca(10);
    t_u12 *msg2 = __builtin_alloca(10);
    int same;

    msg1 = malloc (sizeof (t_s12));
    msg2 = malloc (sizeof (t_u12));

    memset(msg1, 0, sizeof(t_s12));
    memcpy(msg2, &msg1, sizeof(t_s12));
    same = memcmp(msg2, msg1, sizeof(t_s12));
    free(msg1);

    return same;
}

Reply via email to