https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110311
--- Comment #20 from anlauf at gcc dot gnu.org --- If that doesn't help: there appear to be recent optimizations for divmod. Try declaring a1, a2 as volatile.
anlauf at gcc dot gnu.org via Gcc-bugs Sat, 24 Jun 2023 06:46:59 -0700
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110311
--- Comment #20 from anlauf at gcc dot gnu.org --- If that doesn't help: there appear to be recent optimizations for divmod. Try declaring a1, a2 as volatile.