aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/decl.c22
-rw-r--r--gcc/ada/trans.c14
-rw-r--r--gcc/ada/utils.c4
-rw-r--r--gcc/ada/utils2.c4
5 files changed, 28 insertions, 25 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 2af5c34..183a7fb 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,12 @@
+2007-01-24 Roger Sayle <roger@eyesopen.com>
+
+ * decl.c (gnat_to_gnu_entity): Use TREE_OVERFLOW instead of
+ TREE_CONSTANT_OVERFLOW.
+ (allocatable_size_p, annotate_value): Likewise.
+ * trans.c (gnat_to_gnu): Likewise.
+ * utils.c (unchecked_convert): Likewise.
+ * utils2.c (build_simple_component_ref): Likewise.
+
2007-01-23 Richard Guenther <rguenther@suse.de>
PR bootstrap/30541
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c
index c18f08d..a7ee5ce 100644
--- a/gcc/ada/decl.c
+++ b/gcc/ada/decl.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2006, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2007, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
@@ -1044,7 +1044,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
}
if (TREE_CODE (TYPE_SIZE_UNIT (gnu_alloc_type)) == INTEGER_CST
- && TREE_CONSTANT_OVERFLOW (TYPE_SIZE_UNIT (gnu_alloc_type))
+ && TREE_OVERFLOW (TYPE_SIZE_UNIT (gnu_alloc_type))
&& !Is_Imported (gnat_entity))
post_error ("Storage_Error will be raised at run-time?",
gnat_entity);
@@ -1907,9 +1907,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
(fold (build2 (MINUS_EXPR, gnu_index_subtype,
TYPE_MAX_VALUE (gnu_index_subtype),
TYPE_MIN_VALUE (gnu_index_subtype))))))
- TREE_OVERFLOW (gnu_min) = TREE_OVERFLOW (gnu_max)
- = TREE_CONSTANT_OVERFLOW (gnu_min)
- = TREE_CONSTANT_OVERFLOW (gnu_max) = 0;
+ TREE_OVERFLOW (gnu_min) = TREE_OVERFLOW (gnu_max) = 0;
/* Similarly, if the range is null, use bounds of 1..0 for
the sizetype bounds. */
@@ -1939,8 +1937,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
code below to malfunction if we don't handle it specially. */
if (TREE_CODE (gnu_base_min) == INTEGER_CST
&& TREE_CODE (gnu_base_max) == INTEGER_CST
- && !TREE_CONSTANT_OVERFLOW (gnu_base_min)
- && !TREE_CONSTANT_OVERFLOW (gnu_base_max)
+ && !TREE_OVERFLOW (gnu_base_min)
+ && !TREE_OVERFLOW (gnu_base_max)
&& tree_int_cst_lt (gnu_base_max, gnu_base_min))
gnu_high = size_zero_node, gnu_min = size_one_node;
@@ -1986,10 +1984,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
gnu_base_max = gnu_max;
if ((TREE_CODE (gnu_base_min) == INTEGER_CST
- && TREE_CONSTANT_OVERFLOW (gnu_base_min))
+ && TREE_OVERFLOW (gnu_base_min))
|| operand_equal_p (gnu_base_min, gnu_base_base_min, 0)
|| (TREE_CODE (gnu_base_max) == INTEGER_CST
- && TREE_CONSTANT_OVERFLOW (gnu_base_max))
+ && TREE_OVERFLOW (gnu_base_max))
|| operand_equal_p (gnu_base_max, gnu_base_base_max, 0))
max_overflow = true;
@@ -2004,7 +2002,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
size_zero_node);
if (TREE_CODE (gnu_this_max) == INTEGER_CST
- && TREE_CONSTANT_OVERFLOW (gnu_this_max))
+ && TREE_OVERFLOW (gnu_this_max))
max_overflow = true;
gnu_max_size
@@ -4590,7 +4588,7 @@ allocatable_size_p (tree gnu_size, bool static_p)
Storage_Error. */
if (!static_p)
return !(TREE_CODE (gnu_size) == INTEGER_CST
- && TREE_CONSTANT_OVERFLOW (gnu_size));
+ && TREE_OVERFLOW (gnu_size));
/* Otherwise, we need to deal with both variable sizes and constant
sizes that won't fit in a host int. We use int instead of HOST_WIDE_INT
@@ -5906,7 +5904,7 @@ annotate_value (tree gnu_size)
bool adjust = false;
tree temp;
- if (TREE_CONSTANT_OVERFLOW (negative_size))
+ if (TREE_OVERFLOW (negative_size))
{
negative_size
= size_binop (MINUS_EXPR, bitsize_zero_node,
diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c
index 14c059d..eee950b 100644
--- a/gcc/ada/trans.c
+++ b/gcc/ada/trans.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2006, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2007, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
@@ -2714,7 +2714,7 @@ gnat_to_gnu (Node_Id gnat_node)
of the subtype, but that causes problems with subtypes whose usage
will raise Constraint_Error and with biased representation, so
we don't. */
- gcc_assert (!TREE_CONSTANT_OVERFLOW (gnu_result));
+ gcc_assert (!TREE_OVERFLOW (gnu_result));
}
break;
@@ -2741,7 +2741,7 @@ gnat_to_gnu (Node_Id gnat_node)
gnu_result_type = get_unpadded_type (Etype (gnat_node));
gnu_result = UI_To_gnu (Corresponding_Integer_Value (gnat_node),
gnu_result_type);
- gcc_assert (!TREE_CONSTANT_OVERFLOW (gnu_result));
+ gcc_assert (!TREE_OVERFLOW (gnu_result));
}
/* We should never see a Vax_Float type literal, since the front end
@@ -3440,11 +3440,7 @@ gnat_to_gnu (Node_Id gnat_node)
tree gnu_old_lhs = gnu_lhs;
gnu_lhs = convert (gnu_type, gnu_lhs);
if (TREE_CODE (gnu_lhs) == INTEGER_CST && ignore_lhs_overflow)
- {
- TREE_OVERFLOW (gnu_lhs) = TREE_OVERFLOW (gnu_old_lhs);
- TREE_CONSTANT_OVERFLOW (gnu_lhs)
- = TREE_CONSTANT_OVERFLOW (gnu_old_lhs);
- }
+ TREE_OVERFLOW (gnu_lhs) = TREE_OVERFLOW (gnu_old_lhs);
gnu_rhs = convert (gnu_type, gnu_rhs);
}
@@ -4343,7 +4339,7 @@ gnat_to_gnu (Node_Id gnat_node)
/* If the result is a constant that overflows, raise constraint error. */
else if (TREE_CODE (gnu_result) == INTEGER_CST
- && TREE_CONSTANT_OVERFLOW (gnu_result))
+ && TREE_OVERFLOW (gnu_result))
{
post_error ("Constraint_Error will be raised at run-time?", gnat_node);
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c
index b5854fa..52bc663 100644
--- a/gcc/ada/utils.c
+++ b/gcc/ada/utils.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2006, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2007, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
@@ -3680,7 +3680,7 @@ unchecked_convert (tree type, tree expr, bool notrunc_p)
when it is false, we can rely on the fact that such conversions are
erroneous anyway. */
if (TREE_CODE (expr) == INTEGER_CST)
- TREE_OVERFLOW (expr) = TREE_CONSTANT_OVERFLOW (expr) = 0;
+ TREE_OVERFLOW (expr) = 0;
/* If the sizes of the types differ and this is an VIEW_CONVERT_EXPR,
show no longer constant. */
diff --git a/gcc/ada/utils2.c b/gcc/ada/utils2.c
index ffca597..04e968e 100644
--- a/gcc/ada/utils2.c
+++ b/gcc/ada/utils2.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2006, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2007, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
@@ -1649,7 +1649,7 @@ build_simple_component_ref (tree record_variable, tree component,
Note that we don't need to warn since this will be done on trying
to declare the object. */
if (TREE_CODE (DECL_FIELD_OFFSET (field)) == INTEGER_CST
- && TREE_CONSTANT_OVERFLOW (DECL_FIELD_OFFSET (field)))
+ && TREE_OVERFLOW (DECL_FIELD_OFFSET (field)))
return NULL_TREE;
/* It would be nice to call "fold" here, but that can lose a type