https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69845
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I believe the bug is in extract_muldiv_1, what it does for PLUS_EXPR/MINUS_EXPR looks inherently unsafe, unless it changes the operation to be actually performed in a type with defined overflow and then cast back.