[Bug tree-optimization/45122] [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution

aoliva at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jan 16 08:30:00 GMT 2011


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

--- Comment #6 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2011-01-16 08:13:44 UTC ---
Created attachment 22978
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22978
Patch that fixes the problem by discarding too unsafe optimizations

When there's more than one exit from the loop, discarding the assumptions for
the trip count to apply might be regarded as a bit too unsafe, as in this
particular case.  This candidate patch disables the assumption entirely, and
disables the -Wunsafe-loop-optimizations warnings the loop exits would produce,
since -funsafe-loop-optimizations wouldn't affect them any longer.



More information about the Gcc-bugs mailing list