re PR middle-end/35163 (folding comparison loses cast)
authorRichard Guenther <rguenther@suse.de>
Tue, 12 Feb 2008 21:26:49 +0000 (21:26 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 12 Feb 2008 21:26:49 +0000 (21:26 +0000)
commit8f768a5a18a47ce412c6455a6e802d4b703fcf26
tree093d59274ea04e5e86cb95c9e81e640a0bbf85b8
parentd2a18787b75b66176fac5a33be4c630054f26127
re PR middle-end/35163 (folding comparison loses cast)

2008-02-12  Richard Guenther  <rguenther@suse.de>

PR middle-end/35163
* fold-const.c (fold_widened_comparison): Use get_unwidened in
value-preserving mode.  Disallow final truncation.

* gcc.c-torture/execute/pr35163.c: New testcase.

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