https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114217
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- That is if we have: void f(void) { char t[sizeof(int)] __attribute__((aligned(1))); int *a = (int*)&t; // } The above code is undefined even if you have not accessed via *a at all.