http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60819
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-04-11 Component|rtl-optimization |c Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- I think you are violating aliasing in your testcase: typedef int __m64 __attribute__ ((__vector_size__ (8), __may_alias__)); typedef short __v4hi __attribute__ ((__vector_size__ (8))); you access __m64 with a __v4hi (__may_alias__ doesn't make the __m64 parameter have alias-set zero!). Now, we lower this to return (int) *((short int *) &VIEW_CONVERT_EXPR<vector(4) short int>(__A) + (sizetype) ((long unsigned int) __N * 2)); because of the variable indexing which makes this a memory access. So eventually that lowering should make sure no TBAA issues appear or we should reject variable indexes here. That is, variable indexing should use a MEM_REF with alias-set zero (if we are sure that non-variable indexing will never result in a memory access, it seems that the FE lowers constant indexes the same and only later during gimplification we fold that to use a BIT_FIELD_REF). Confirmed as a Frontend bug sofar, just in case the testcase is valid.