re PR middle-end/39867 (Wrong result of conditional operator exp < 2 ? 2U : (unsigned...
commit30349c7400289ab4b00f07c73a2d630bb28f3b23
authorPaolo Bonzini <bonzini@gnu.org>
Fri, 24 Apr 2009 10:29:18 +0000 (24 10:29 +0000)
committerPaolo Bonzini <bonzini@gcc.gnu.org>
Fri, 24 Apr 2009 10:29:18 +0000 (24 10:29 +0000)
treeeeeac29485c66b9f6da709cfda3303b2e42fab32
parent8d8256c19709b2ec4a2231f2e1b320966b503b3d
re PR middle-end/39867 (Wrong result of conditional operator exp < 2 ? 2U : (unsigned int) exp)

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 operands.

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

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

From-SVN: r146695
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr39867.c [new file with mode: 0644]