https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103061
--- Comment #9 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #8) > (In reply to Aldy Hernandez from comment #5) > > > That is, is signed overflow undefined in overflow? > > > > Errr, "is signed overflow undefined for integer(kind=4)?" > > Yes it is undefined. Figures spec would have undefined code in it. > > So the question to the reporter is does -fwrapv works for the original > testcase? Ha. Good idea! The threading still happens with -fwrapv on this testcase: Registering value_relation (_134 > M.10_120) (bb34) at _134 = M.10_120 + 1; Is -fwrapv respected by Fortran, cause I'm pretty sure we wouldn't register that relation if the addition wrapped?