diff options
Diffstat (limited to 'gcc/ada/decl.c')
-rw-r--r-- | gcc/ada/decl.c | 22 |
1 files changed, 10 insertions, 12 deletions
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, |