Fix Issue 12164 - Function returning ptrdiff_t.min in 64-bit returning 0 when -O is set