https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98036
--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> --- Something is wrong in [printf added by me]: static int check_sword2dword () { int i, j, s, t, check_fails = 0; for (i = 0; i < (NUM * 8); i = i + 8) { for (j = 0; j < 4; j++) { t = i + (2 * j); s = (i / 2) + j; printf ("%i %i %i %i\n", i, j, s, t); res.li[s] = src1.si[t] - src1.si[t + 1] ; if (res.li[s] != dst.li[s]) check_fails++; } } } gcc -O2 -msse -m32 $ ./a.out 80 80 40 80 80 81 41 82 80 82 42 84 80 83 43 86 80 84 44 88 80 85 45 90 ... 80 1006 966 1932 80 1007 967 1934 80 1008 968 1936 Segmentation fault (core dumped) i and j should start from 0.