M.C.A. (Marco) Devillers wrote:
libffi calls. It may be that the pointer arithmetic is uncleanly defined/optimized away?
maybe aliasing issues? try -fno-strict-aliasing (I don't know if it works with -O3) so maybe try -fstrict-aliasing without -O3 and see if your code then fails. see gcc man, dig for "strict-aliasing," there is some information on this issue.