PR tree-optimization/18431
* fold-const.c (associate_trees): Do not produce x + 0.
(fold_widened_comparison, fold_sign_changed_comparison): New functions.
(fold): Use them.
* tree-ssa-loop-niter.c (upper_bound_in_type, lower_bound_in_type):
Moved ...
* tree.c (upper_bound_in_type, lower_bound_in_type): Here.
* tree.h (upper_bound_in_type, lower_bound_in_type): Declare.
* testsuite/gcc.c-torture/execute/
20041114-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90646 138bc75d-0d04-0410-961f-82ee72b054a4