[Bug middle-end/62103] Incorrect folding of bitfield in a union on big endian targets

jiwang at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 27 22:32:00 GMT 2015


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

--- Comment #8 from Jiong Wang <jiwang at gcc dot gnu.org> ---
looks like this fix is too conservative. it will disable const fold for
bit-field completely. for bitfld-6/little-endian, previously, we can generated

main:
        mov     w0, 0
        ret

while after this patch, we always load from memory. any specific reason for
this?

shouldn't we fix the code to let big-endian get correct folded constant?



More information about the Gcc-bugs mailing list