aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/utils.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-08-10 21:16:07 -0700
committerRichard Henderson <rth@gcc.gnu.org>2004-08-10 21:16:07 -0700
commit1a186ec5586436555a30227776d75c2516fd5911 (patch)
treee57fc8a325147e3d2f9c065e1b28d63cdcb6c70a /gcc/ada/utils.c
parent89f1a7022ee2b62d67948797837c2a683bfa4995 (diff)
downloadgcc-1a186ec5586436555a30227776d75c2516fd5911.zip
gcc-1a186ec5586436555a30227776d75c2516fd5911.tar.gz
gcc-1a186ec5586436555a30227776d75c2516fd5911.tar.bz2
builtins.def (BUILT_IN_STACK_ALLOC): Remove.
* builtins.def (BUILT_IN_STACK_ALLOC): Remove. * builtins.c (expand_builtin) <BUILT_IN_STACK_ALLOC>: Remove. * dwarf2out.c (loc_descriptor): Handle PARALLEL here ... (add_location_or_const_value_attribute): ... not here. Use loc_descriptor_from_tree if possible. (loc_descriptor_from_tree_1): Rename from loc_descriptor_from_tree. Simplify address handling. Handle DECL_VALUE_EXPR. Handle register values specially. (loc_descriptor_from_tree): New. Update callers. * expr.c (expand_var): Ignore DECL_VALUE_EXPR variables. * gimplify.c (gimplify_decl_expr): Lower variable sized types to pointer plus dereference. Set DECL_VALUE_EXPR. Set save_stack. (gimplify_call_expr): Do not recognize BUILT_IN_STACK_ALLOC and BUILT_IN_STACK_RESTORE. (gimplify_expr): Lower DECL_VALUE_EXPR decls. * stmt.c (expand_stack_alloc): Remove. * tree-mudflap.c (mx_register_decls): Don't look for BUILT_IN_STACK_ALLOC. * tree-nested.c (convert_local_reference): Likewise. * tree.h (DECL_VALUE_EXPR): New. ada/ * utils.c (gnat_install_builtins): Remove __builtin_stack_alloc, add __builtin_alloca. fortran/ * f95-lang.c (gfc_init_builtin_functions): Remove __builtin_stack_alloc, add __builtin_alloca. * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR. * trans-decl.c (gfc_trans_auto_character_variable): Likewise. From-SVN: r85794
Diffstat (limited to 'gcc/ada/utils.c')
-rw-r--r--gcc/ada/utils.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c
index 46c5639..4f23629 100644
--- a/gcc/ada/utils.c
+++ b/gcc/ada/utils.c
@@ -481,6 +481,9 @@ gnat_install_builtins ()
gnat_define_builtin ("__builtin_clzll", ftype, BUILT_IN_CLZLL, "clzll",
true);
+ /* The init_trampoline and adjust_trampoline builtins aren't used directly.
+ They are inserted during lowering of nested functions. */
+
tmp = tree_cons (NULL_TREE, ptr_void_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);
@@ -493,21 +496,24 @@ gnat_install_builtins ()
gnat_define_builtin ("__builtin_adjust_trampoline", ftype,
BUILT_IN_ADJUST_TRAMPOLINE, "adjust_trampoline", true);
- tmp = tree_cons (NULL_TREE, ptr_void_type_node, void_list_node);
- tmp = tree_cons (NULL_TREE, size_type_node, void_list_node);
- ftype = build_function_type (ptr_void_type_node, tmp);
- gnat_define_builtin ("__builtin_stack_alloc", ftype, BUILT_IN_STACK_ALLOC,
- "stack_alloc", false);
+ /* The stack_save, stack_restore, and alloca builtins aren't used directly.
+ They are inserted during gimplification to implement variable sized stack
+ allocation. */
- /* The stack_save and stack_restore builtins aren't used directly. They
- are inserted during gimplification to implement stack_alloc calls. */
ftype = build_function_type (ptr_void_type_node, void_list_node);
gnat_define_builtin ("__builtin_stack_save", ftype, BUILT_IN_STACK_SAVE,
"stack_save", false);
+
tmp = tree_cons (NULL_TREE, ptr_void_type_node, void_list_node);
ftype = build_function_type (void_type_node, tmp);
gnat_define_builtin ("__builtin_stack_restore", ftype,
BUILT_IN_STACK_RESTORE, "stack_restore", false);
+
+ tmp = tree_cons (NULL_TREE, size_type_node, void_list_node);
+ ftype = build_function_type (ptr_void_type_node, tmp);
+ gnat_define_builtin ("__builtin_alloca", ftype, BUILT_IN_ALLOCA,
+ "alloca", false);
+
}
/* Create the predefined scalar types such as `integer_type_node' needed