https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50865
Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Joost.VandeVondele at mat dot ethz | |.ch --- Comment #13 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> --- (In reply to Mikael Pettersson from comment #12) > Created attachment 34323 [details] > patch restricting the X % -Y -> X % Y transformation to when it's safe > > This proposed patch restricts the X % -Y -> X % Y transformation to cases > when we can be certain that it doesn't result in undefined behaviour, i.e. > when Y != 1 or X != INT_MIN. Passes bootstrap and testsuite on x86_64-linux > so far. Shouldn't disabling this be language dependent ? I.e. in Fortran this transformation is always valid (as integers in conforming programs are always in the symmetric range).