re PR middle-end/40747 (wrong code for int-is-in-range test at -O1 and above)
authorJakub Jelinek <jakub@redhat.com>
Wed, 15 Jul 2009 10:17:54 +0000 (12:17 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 15 Jul 2009 10:17:54 +0000 (12:17 +0200)
commitb4e4232dc53bbe172d5a7f2a4df972846d8508c6
tree5543d61cd34cab5ac95d722b8fd9da0a241d17ea
parent00838d9ae17529661245350976a8f1ce5e553415
re PR middle-end/40747 (wrong code for int-is-in-range test at -O1 and above)

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

* gcc.c-torture/execute/pr40747.c: New test.

From-SVN: r149675
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr40747.c [new file with mode: 0644]