[Bug middle-end/39867] [4.4/4.5 Regression] Wrong result of conditional operator exp < 2 ? 2U : (unsigned int) exp

bonzini at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Apr 24 11:35:00 GMT 2009



------- Comment #5 from bonzini at gnu dot org  2009-04-24 11:35 -------
Subject: Bug 39867

Author: bonzini
Date: Fri Apr 24 11:34:59 2009
New Revision: 146702

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146702
Log:
2009-04-24  Paolo Bonzini  <bonzini@gnu.org>

        PR middle-end/39867
        * fold-const.c (fold_cond_expr_with_comparison): When folding
        > and >= to MAX, make sure the MAX uses the same type as the
        comparison's operands.

testsuite:
2009-04-24  Paolo Bonzini  <bonzini@gnu.org>

        PR middle-end/39867
        * gcc.dg/pr39867.c: New.


Added:
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr39867.c
      - copied unchanged from r146695, trunk/gcc/testsuite/gcc.dg/pr39867.c
Modified:
    branches/gcc-4_4-branch/gcc/ChangeLog
    branches/gcc-4_4-branch/gcc/fold-const.c
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


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



More information about the Gcc-bugs mailing list