https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86995
vladlazar at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |vladlazar at gcc dot gnu.org Resolution|--- |FIXED --- Comment #8 from vladlazar at gcc dot gnu.org --- Fixed by r263973. The issue was that in case of underflow, the overflow flag was not set. The solution was to use wi::sub when decrementing.