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/56051] Wrong expression evaluation


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


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