https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103832
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- You are using the attribute aligned incorrectly. aligned_float *data = static_cast<aligned_float *>(aligned_alloc(64, 8192*sizeof(float))); float sum = 0.0f; for (int i=1; i<8192; i++) sum += data[i]; You are saying data+i are all 64byte aligned which is obviously not correct. If you want to say data+0 is aligned at a 64byte boundary you should use instead __builtin_assume_aligned . https://gcc.gnu.org/onlinedocs/gcc-11.2.0/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fassume_005faligned