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/46909] [4.6 Regression] Logical OR expressions are miscompiled


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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-14 14:10:09 UTC ---
Author: jakub
Date: Tue Dec 14 14:09:59 2010
New Revision: 167800

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167800
Log:
    PR tree-optimization/46909
    * gimple-fold.c (and_var_with_comparison_1): Save partial
    result even in the is_and case, if both partial results
    are the same, return it.
    (or_var_with_comparison_1): Use is_or predicate instead of
    innercode == TRUTH_OR_EXPR test.  Save partial result
    even in the is_or case, if both partial results are the
    same, return it.  In the !is_or case when both partial
    results are the same, return the partial result instead
    of boolean_true_node.

    * gcc.c-torture/execute/pr46909-1.c: New test.
    * gcc.c-torture/execute/pr46909-2.c: New test.
    * gcc.dg/pr46909.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/execute/pr46909-1.c
    trunk/gcc/testsuite/gcc.c-torture/execute/pr46909-2.c
    trunk/gcc/testsuite/gcc.dg/pr46909.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimple-fold.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]