with something like arr[0][j*ARRAYWIDTH+i]. gcc no longer allows such hacks and discards the code silently because of undefined behaviour.