This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/39867] [4.4/4.5 Regression] Wrong result of conditional operator exp < 2 ? 2U : (unsigned int) exp
- From: "bonzini at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Apr 2009 11:35:24 -0000
- Subject: [Bug middle-end/39867] [4.4/4.5 Regression] Wrong result of conditional operator exp < 2 ? 2U : (unsigned int) exp
- References: <bug-39867-6373@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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