https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64511
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- x % x for x == 0 is undefined behavior, so perhaps with the exception of sanitization we can just assume it is not 0 and thus fold x % x to 0. Or does e.g. Ada/Java require something different?