aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/decl.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2007-03-09 17:09:54 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2007-03-09 17:09:54 +0000
commit9645c3c57385f21e01f6c0af9dc552485b156edd (patch)
tree1e4b81524f87b3b337510637b1b2c66422dfc8ba /gcc/ada/decl.c
parent63a0874077b3325c2b3cc47401d8bfe916d8f128 (diff)
downloadgcc-9645c3c57385f21e01f6c0af9dc552485b156edd.zip
gcc-9645c3c57385f21e01f6c0af9dc552485b156edd.tar.gz
gcc-9645c3c57385f21e01f6c0af9dc552485b156edd.tar.bz2
cuintp.c (UI_To_gnu): Use fold_buildN calls instead of calling fold with the result of buildN.
* cuintp.c (UI_To_gnu): Use fold_buildN calls instead of calling fold with the result of buildN. * decl.c (gnat_to_gnu_entity): Likewise. * trans.c (Attribute_to_gnu, gnat_to_gnu, emit_check): Likewise. * utils.c (finish_record_type, merge_sizes, max_size, convert): Likewise. * utils2.c (gnat_truthvalue_conversion, compare_arrays, nonbinary_modular_operation, build_binary_op, build_unary_op, build_cond_expr): Likewise. * utils.c (convert): Use fold_build1 when casting values to void. * utils2.c (gnat_truthvalue_conversion): Use build_int_cst and fold_convert instead of convert when appropriate. From-SVN: r122752
Diffstat (limited to 'gcc/ada/decl.c')
-rw-r--r--gcc/ada/decl.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c
index d6006c5..80b9044 100644
--- a/gcc/ada/decl.c
+++ b/gcc/ada/decl.c
@@ -1332,8 +1332,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
{
TYPE_MODULAR_P (gnu_type) = 1;
SET_TYPE_MODULUS (gnu_type, gnu_modulus);
- gnu_high = fold (build2 (MINUS_EXPR, gnu_type, gnu_modulus,
- convert (gnu_type, integer_one_node)));
+ gnu_high = fold_build2 (MINUS_EXPR, gnu_type, gnu_modulus,
+ convert (gnu_type, integer_one_node));
}
/* If we have to set TYPE_PRECISION different from its natural value,
@@ -1909,10 +1909,13 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
&& TREE_CODE (gnu_max) == INTEGER_CST
&& TREE_OVERFLOW (gnu_min) && TREE_OVERFLOW (gnu_max)
&& (!TREE_OVERFLOW
- (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) = 0;
+ (fold_build2 (MINUS_EXPR, gnu_index_subtype,
+ TYPE_MAX_VALUE (gnu_index_subtype),
+ TYPE_MIN_VALUE (gnu_index_subtype)))))
+ {
+ TREE_OVERFLOW (gnu_min) = 0;
+ TREE_OVERFLOW (gnu_max) = 0;
+ }
/* Similarly, if the range is null, use bounds of 1..0 for
the sizetype bounds. */