https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70742
--- Comment #2 from Daniel Gutson <daniel.gutson at tallertechnologies dot com> --- (In reply to Andrew Pinski from comment #1) > Let me reword the summary. what you want is div and ldiv and imaxdiv to be > supported as a builtin, in that it expands correctly to do the div/mod > inlined. > > >The goal is that std::div and cstdlib's div can be reimplemented as calling > >this builtin. > > Or rather they stay the way they are and GCC rewrites it to be correct. AKA > no reimplementing at all. That's correct, my bad: the goal is actually not touching the library at all.