Commit 762dffe7 by Doug Rupp Committed by Arnaud Charlet

utils2.c (fill_vms_descriptor): Use long_integer for comparison.

2008-08-04  Doug Rupp  <rupp@adacore.com>

	* utils2.c (fill_vms_descriptor): Use long_integer for comparison.
	Call add_stmt_with_node to set locus.

From-SVN: r138589
parent bdc33a55
...@@ -2173,6 +2173,7 @@ fill_vms_descriptor (tree expr, Entity_Id gnat_formal) ...@@ -2173,6 +2173,7 @@ fill_vms_descriptor (tree expr, Entity_Id gnat_formal)
int do_range_check = int do_range_check =
strcmp ("MBO", strcmp ("MBO",
IDENTIFIER_POINTER (DECL_NAME (TYPE_FIELDS (record_type)))); IDENTIFIER_POINTER (DECL_NAME (TYPE_FIELDS (record_type))));
tree malloc64low = build_int_cstu (long_integer_type_node, 0x80000000);
expr = maybe_unconstrained_array (expr); expr = maybe_unconstrained_array (expr);
gnat_mark_addressable (expr); gnat_mark_addressable (expr);
...@@ -2189,14 +2190,14 @@ fill_vms_descriptor (tree expr, Entity_Id gnat_formal) ...@@ -2189,14 +2190,14 @@ fill_vms_descriptor (tree expr, Entity_Id gnat_formal)
strcmp (IDENTIFIER_POINTER (DECL_NAME (field)), "POINTER") == 0) strcmp (IDENTIFIER_POINTER (DECL_NAME (field)), "POINTER") == 0)
{ {
tree t = build3 (COND_EXPR, void_type_node, tree t = build3 (COND_EXPR, void_type_node,
build_binary_op (LT_EXPR, integer_type_node, build_binary_op (GE_EXPR, long_integer_type_node,
convert (integer_type_node, convert (long_integer_type_node,
conexpr), conexpr),
integer_zero_node), malloc64low),
build_call_raise (CE_Range_Check_Failed, Empty, build_call_raise (CE_Range_Check_Failed, Empty,
N_Raise_Constraint_Error), N_Raise_Constraint_Error),
NULL_TREE); NULL_TREE);
add_stmt (t); add_stmt_with_node (t, gnat_formal);
} }
const_list = tree_cons (field, conexpr, const_list); const_list = tree_cons (field, conexpr, const_list);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment