Message 143990 - Python tracker
I can reproduce your results with a recent clang. gcc has similar optimization behavior, but for gcc ./configure automatically adds -fwrapv, which prevents the incorrect results. I'm closing this as a duplicate of #11149.