aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/utils.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2004-06-14 14:09:38 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2004-06-14 10:09:38 -0400
commit966389eeaaf6b674bbfbdc34b06314c2dd7f8591 (patch)
tree4a73e45526ddb48295d919dce3f9ab9d54d0cdea /gcc/ada/utils.c
parent715f8bb802ecb1ab114f8b904fa376f40ccb50c7 (diff)
downloadgcc-966389eeaaf6b674bbfbdc34b06314c2dd7f8591.zip
gcc-966389eeaaf6b674bbfbdc34b06314c2dd7f8591.tar.gz
gcc-966389eeaaf6b674bbfbdc34b06314c2dd7f8591.tar.bz2
ada-tree.def (LOOP_STMT, EXIT_STMT): Update documentation.
* ada-tree.def (LOOP_STMT, EXIT_STMT): Update documentation. * ada-tree.h (EXIT_STMT_LABEL): Renamed from EXIT_STMT_LOOP. * decl.c (gnat_to_gnu_entity): Also set force_global for imported subprograms. * trans.c (gnu_loop_label_stack): Renamed from gnu_loop_stmt_stack; all callers changed. (gnat_to_gnu, case N_Loop_Statement, case N_Exit_Statement): Change the way that EXIT_STMT finds the loop label. (gnat_gimplify_stmt, case LOOP_STMT, EXIT_STMT): Likewise. (gnat_gimplify_stmt, case DECL_STMT): Handle variable-sized decls here. (add_stmt): Use annotate_with_locus insted of setting directly. (pos_to_construct): Set TREE_PURPOSE of each entry to index. (gnat_stabilize_reference, case ARRAY_RANGE_REF): Merge with ARRAY_REF. * utils.c (gnat_install_builtins): Install __builtin_memcmp. (build_vms_descriptor): Add extra args to ARRAY_REF. (convert): Use VIEW_CONVERT_EXPR between aggregate types. * utils2.c (gnat_truthvalue_conversion, case INTEGER_CST, REAL_CST): New cases. (build_binary_op): Don't make explicit CONVERT_EXPR. Add extra rgs to ARRAY_REF. From-SVN: r83103
Diffstat (limited to 'gcc/ada/utils.c')
-rw-r--r--gcc/ada/utils.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c
index 1b50b71..6906e98 100644
--- a/gcc/ada/utils.c
+++ b/gcc/ada/utils.c
@@ -467,6 +467,13 @@ gnat_install_builtins ()
gnat_define_builtin ("__builtin_memcpy", ftype, BUILT_IN_MEMCPY,
"memcpy", false);
+ tmp = tree_cons (NULL_TREE, size_type_node, void_list_node);
+ tmp = tree_cons (NULL_TREE, ptr_void_type_node, tmp);
+ tmp = tree_cons (NULL_TREE, ptr_void_type_node, tmp);
+ ftype = build_function_type (integer_type_node, tmp);
+ gnat_define_builtin ("__builtin_memcmp", ftype, BUILT_IN_MEMCMP,
+ "memcmp", false);
+
tmp = tree_cons (NULL_TREE, integer_type_node, void_list_node);
ftype = build_function_type (integer_type_node, tmp);
gnat_define_builtin ("__builtin_clz", ftype, BUILT_IN_CLZ, "clz", true);
@@ -2489,7 +2496,8 @@ build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity)
for (i = 0, inner_type = type; i < ndim;
i++, inner_type = TREE_TYPE (inner_type))
tem = build (ARRAY_REF, TREE_TYPE (inner_type), tem,
- convert (TYPE_DOMAIN (inner_type), size_zero_node));
+ convert (TYPE_DOMAIN (inner_type), size_zero_node),
+ NULL_TREE, NULL_TREE);
field_list
= chainon (field_list,
@@ -2847,10 +2855,10 @@ convert (tree type, tree expr)
if (type == etype)
return expr;
/* If we're converting between two aggregate types that have the same main
- variant, just make a NOP_EXPR. */
+ variant, just make a VIEW_CONVER_EXPR. */
else if (AGGREGATE_TYPE_P (type)
&& TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (etype))
- return build1 (NOP_EXPR, type, expr);
+ return build1 (VIEW_CONVERT_EXPR, type, expr);
/* If the input type has padding, remove it by doing a component reference
to the field. If the output type has padding, make a constructor