From 1a186ec5586436555a30227776d75c2516fd5911 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 10 Aug 2004 21:16:07 -0700 Subject: builtins.def (BUILT_IN_STACK_ALLOC): Remove. * builtins.def (BUILT_IN_STACK_ALLOC): Remove. * builtins.c (expand_builtin) : 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 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/utils.c | 20 +++++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) (limited to 'gcc/ada') diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 0713901..9cb2dfd 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,10 @@ 2004-08-10 Richard Henderson + * utils.c (gnat_install_builtins): Remove __builtin_stack_alloc, + add __builtin_alloca. + +2004-08-10 Richard Henderson + * config-lang.in (boot_language): Yes. 2004-08-09 Thomas Quinot 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 -- cgit v1.1