> From: Richard Biener [mailto:richard.guent...@gmail.com]
> Sent: Friday, June 27, 2014 6:23 PM
> 
> Yes - I was specifically looking for an early out to avoid wrong-code.
> So, is size % BITS_PER_UNIT != 0 a working fix to avoid the wrong-code
> issues with bitfields (on big-endian targets)?

I'm afraid not. A bitfield of 24 bits passes this test but the folding with
VIEW_CONVERT_EXPR is still wrong. Better compare size against the bitsize
of type. That would eliminate all bitfields.

> 
> I'd rather disable it for all endianesses - gives us more incentive
> to fix it properly.

Ok.

> 
> Yeah (the code is already there in varasm.c:output_constructor - it
> just uses a different "buffer").

Good, I'll take a look at it when I'll come back to this patch.

Best regards,

Thomas


Reply via email to