This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/45122] [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution
- From: "aoliva at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 16 Jan 2011 08:13:54 +0000
- Subject: [Bug tree-optimization/45122] [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution
- Auto-submitted: auto-generated
- References: <bug-45122-4@http.gcc.gnu.org/bugzilla/>
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.