http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49413
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-04 09:35:13 UTC --- There are two camps of users, some want the compiler to treat *(double *) as aligned because, damn, they said so (especially on targets where accessing unaligned data is costly)! Others want the compiler to figure out misalignment properly, thus, treat *(double *) as aligned only if it knows (for sure?). We can't serve both camps. Consider void foo (double *p, double *q, int n) { int i; for (i = 0; i < n; ++i) p[i] += q[i]; } do you want the compiler to vectorize the above or not? The C standard says we can assume *p and *q are properly aligned for what the ABI says about doubles. But you say, well, I may als well call this function with some misaligned data where I think the compiler should figure this out for me. Now, I say not so.