[PATCH] Fix unaligned access generated by IVOPTS

Eric Botcazou ebotcazou@adacore.com
Mon Jan 13 10:38:00 GMT 2014

> Note that this now lets unaligned vector moves slip through as
> their TYPE_ALIGN (TREE_TYPE (ref)) is properly reflecting this
> fact, so is anything which dereferences a type with an aligned
> attribute lowering its alignment.
> Which of course raises the question what the function is
> supposed to verify alignment against - given that it is only
> queried for STRICT_ALIGNMENT targets I would guess
> it wants to verify against mode alignment (historically
> at least ...).  Not sure how this observation relates to the
> bug you want to fix though.

Yes, it was the mode, but on STRICT_ALIGNMENT targets types must be as aligned 
as their mode (unless you previously under-aligned the type and knew what you 
were doing when you did it...).  The bug is that, for BLKmode, you really need 
to look at the type to have the alignment.

> Still the patch is an improvement and thus ok.


Eric Botcazou

More information about the Gcc-patches mailing list