[Bug tree-optimization/88732] different results on -O0 and -O1, -O2, -O3, -Os
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88732 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #4 from Richard Biener --- With optimization we constant-fold it, without the runtime expansion exploits undefinedness.
[Bug tree-optimization/88732] different results on -O0 and -O1, -O2, -O3, -Os
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88732 --- Comment #3 from Andrew Pinski --- (In reply to Amos Wang from comment #2) > (In reply to Marc Glisse from comment #1) > > Why not read the documentation for that function? > > "If x is 0, the result is undefined." > > Why the results are different at different optimizing optionss? If it's an > undefined behaviour, I think all results should be the same. undefined behavior means that the value could be different at different times.
[Bug tree-optimization/88732] different results on -O0 and -O1, -O2, -O3, -Os
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88732 --- Comment #2 from Amos Wang --- (In reply to Marc Glisse from comment #1) > Why not read the documentation for that function? > "If x is 0, the result is undefined." Why the results are different at different optimizing optionss? If it's an undefined behaviour, I think all results should be the same.
[Bug tree-optimization/88732] different results on -O0 and -O1, -O2, -O3, -Os
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88732 --- Comment #1 from Marc Glisse --- Why not read the documentation for that function? "If x is 0, the result is undefined."