PATCH: PR target/35767: x86 backend uses aligned load on unaligned memory
Paolo Bonzini
bonzini@gnu.org
Tue May 27 18:41:00 GMT 2008
H.J. Lu wrote:
> On Tue, May 27, 2008 at 8:30 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
>>> + if (TYPE_STRUCTURAL_EQUALITY_P (type))
>>> + align = TYPE_ALIGN (type);
>>> + else
>>> + align = TYPE_ALIGN (TYPE_CANONICAL (type));
>> This seems very wrong. TYPE_STRUCTURAL_EQUALITY_P and TYPE_CANONICAL should
>> only be used for C++, and you only included C test cases. Do you actually
>
> TYPE_CANONICAL is used in C:
>
> /* Make a variant type in the proper way for C/C++, propagating qualifiers
> down to the element type of an array. */
Hm, this code originated in c-common.c; it seems like by the time it was
moved to c-typeck.c, the canonical types were necessary for correctness
in C too. Interesting.
Paolo
More information about the Gcc-patches
mailing list