diff options
author | Roger Sayle <roger@eyesopen.com> | 2005-12-02 04:40:05 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2005-12-02 04:40:05 +0000 |
commit | 87f2a9f57bfc1a95934202110badb4d1a31409ed (patch) | |
tree | 47739b99c89ff7ea1c1f4167c8dc616b6a27c981 /gcc/ada/utils.c | |
parent | cf84391c40d0f336cd8e5981ab7cae08fcde341e (diff) | |
download | gcc-87f2a9f57bfc1a95934202110badb4d1a31409ed.zip gcc-87f2a9f57bfc1a95934202110badb4d1a31409ed.tar.gz gcc-87f2a9f57bfc1a95934202110badb4d1a31409ed.tar.bz2 |
tree.h (TREE_OVERFLOW): Make this flag/predicate specific to constant nodes, i.e.
* tree.h (TREE_OVERFLOW): Make this flag/predicate specific to
constant nodes, i.e. INTEGER_CST, REAL_CST, etc...
* tree-vrp.c (compare_values): Only check TREE_OVERFLOW for
integer constant comparisons.
ada/
* utils.c (max_size): Only test for TREE_OVERFLOW on INTEGER_CST
nodes.
From-SVN: r107870
Diffstat (limited to 'gcc/ada/utils.c')
-rw-r--r-- | gcc/ada/utils.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index 2bfafce..0e0153f 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -2031,12 +2031,19 @@ max_size (tree exp, bool max_p) Likewise, handle a MINUS_EXPR or PLUS_EXPR with the LHS overflowing or the maximum possible value and the RHS a variable. */ - if (max_p && code == MIN_EXPR && TREE_OVERFLOW (rhs)) + if (max_p + && code == MIN_EXPR + && TREE_CODE (rhs) == INTEGER_CST + && TREE_OVERFLOW (rhs)) return lhs; - else if (max_p && code == MIN_EXPR && TREE_OVERFLOW (lhs)) + else if (max_p + && code == MIN_EXPR + && TREE_CODE (lhs) == INTEGER_CST + && TREE_OVERFLOW (lhs)) return rhs; else if ((code == MINUS_EXPR || code == PLUS_EXPR) - && ((TREE_CONSTANT (lhs) && TREE_OVERFLOW (lhs)) + && ((TREE_CODE (lhs) == INTEGER_CST + && TREE_OVERFLOW (lhs)) || operand_equal_p (lhs, TYPE_MAX_VALUE (type), 0)) && !TREE_CONSTANT (rhs)) return lhs; |