diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-04 09:16:54 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-04 09:16:54 +0000 |
commit | ed92d2e057b4a40cc025ee14ae46200c7093693f (patch) | |
tree | 7a6f521f7346b250d58f1f0f085c091402126576 | |
parent | 178f95654d30e4c60cbe548fdef7bf65a0caf6f5 (diff) | |
download | gcc-ed92d2e057b4a40cc025ee14ae46200c7093693f.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138589 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ada/gcc-interface/utils2.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index 8cd61558ec6..44c78f49e3d 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -2173,6 +2173,7 @@ fill_vms_descriptor (tree expr, Entity_Id gnat_formal) int do_range_check = strcmp ("MBO", IDENTIFIER_POINTER (DECL_NAME (TYPE_FIELDS (record_type)))); + tree malloc64low = build_int_cstu (long_integer_type_node, 0x80000000); expr = maybe_unconstrained_array (expr); gnat_mark_addressable (expr); @@ -2189,14 +2190,14 @@ fill_vms_descriptor (tree expr, Entity_Id gnat_formal) strcmp (IDENTIFIER_POINTER (DECL_NAME (field)), "POINTER") == 0) { tree t = build3 (COND_EXPR, void_type_node, - build_binary_op (LT_EXPR, integer_type_node, - convert (integer_type_node, + build_binary_op (GE_EXPR, long_integer_type_node, + convert (long_integer_type_node, conexpr), - integer_zero_node), + malloc64low), build_call_raise (CE_Range_Check_Failed, Empty, N_Raise_Constraint_Error), NULL_TREE); - add_stmt (t); + add_stmt_with_node (t, gnat_formal); } const_list = tree_cons (field, conexpr, const_list); } |