https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354
Eelis <gcc-bugzilla at contacts dot eelis.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gcc-bugzilla at contacts dot eelis | |.net --- Comment #1 from Eelis <gcc-bugzilla at contacts dot eelis.net> --- This is not specific to std::vector and not specific to C++. C testcase: #include <stdio.h> #include <stdint.h> int main() { uint32_t a[256] = {}; uint8_t b[1000] = {}; for(int i = 0; i != 256; ++i) a[i] = i % 5; for (int z = 0 ; z < 16; z++) for (int y = 0 ; y < 4; y++) for (int x = 0 ; x < 4; x++) b[y * 64 + z*4 + x] = a[z * 16 + y * 4 + x]; printf("%d\n", b[4]); return 0; } Prints '4' without -mno-sse, prints '1' with -mno-sse.