This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/56051] Wrong expression evaluation
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 21 Jan 2013 17:55:46 +0000
- Subject: [Bug tree-optimization/56051] Wrong expression evaluation
- Auto-submitted: auto-generated
- References: <bug-56051-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56051
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-21 17:55:46 UTC ---
Author: jakub
Date: Mon Jan 21 17:55:34 2013
New Revision: 195343
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195343
Log:
PR tree-optimization/56051
* fold-const.c (fold_binary_loc): Don't fold
X < (cast) (1 << Y) into (X >> Y) != 0 if cast is either
a narrowing conversion, or widening conversion from signed
to unsigned.
* gcc.c-torture/execute/pr56051.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/execute/pr56051.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog