+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
* *
* 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- *
}
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);
(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. */
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;
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;
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
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
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,
* *
* 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- *
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;
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
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);
}
/* 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);
* *
* 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- *
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. */
* *
* 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- *
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