https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110933
--- Comment #1 from Niklas Hambüchen <mail+gcc at nh2 dot me> --- A tangentially related issue is bug 24542 which is about another common overflow bug, the pattern "u64 = u32 * u32". Just linking it here because people interested in solving integer overflow issues may find it relevant.