[Bug middle-end/57748] [4.8/4.9 Regression] ICE when expanding assignment to unaligned zero-sized array

bernd.edlinger at hotmail dot de gcc-bugzilla@gcc.gnu.org
Wed Aug 28 09:00:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57748

--- Comment #20 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Richard Biener from comment #19)
> volatile bitfield case to be audited as well:
> 
>       /* If the bitfield is volatile, we want to access it in the
>          field's mode, not the computed mode.
>          If a MEM has VOIDmode (external with incomplete type),
>          use BLKmode for it instead.  */
>       if (MEM_P (to_rtx))
>         {
>           if (volatilep && flag_strict_volatile_bitfields > 0)
>             to_rtx = adjust_address (to_rtx, mode1, 0);
>           else if (GET_MODE (to_rtx) == VOIDmode)
>             to_rtx = adjust_address (to_rtx, BLKmode, 0);
>         }
> 
> checks the wrong RTX if it got the movmisalign path.  Or rather,
> -fstrict-volatile bitfields doesn't seem to work properly for
> misaligned accesses?

Definitely. -fstrict-volatile-bitfields does not work at all.
Especially not fo misaligned accesses, or packed structures.
That's what Sanda Loosemore's patch is trying to fix.
As I repeatedly told. Please have a look at it if you can.

If flag_struct_volatile_bitfilds > 0 the
mode1 is diffent here than without.



More information about the Gcc-bugs mailing list