This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/58143] [4.8/4.9 regression] wrong code at -O3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58143

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Because the bug is in lim, so hacking around it in other parts of the compiler
and removing desirable optimizations just to mitigate the bug is not the right
way to fix it.

Either lim shouldn't move the expressions if they are conditional in the loop
body and might trigger undefined behavior in the place where it has been moved
to while it might not trigger undefined behavior originally, or lim should
transform them into expressions that won't trigger undefined behavior while
moving them if it can't prove this will not happen (in this case that would
mean performing the arithmetics in a type that doesn't have undefined behavior
on overflow).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]