aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/f95-lang.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/f95-lang.c')
-rw-r--r--gcc/fortran/f95-lang.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c
index 78bf19a..3e8320c 100644
--- a/gcc/fortran/f95-lang.c
+++ b/gcc/fortran/f95-lang.c
@@ -794,21 +794,23 @@ gfc_init_builtin_functions (void)
gfc_define_builtin ("__builtin_adjust_trampoline", ftype,
BUILT_IN_ADJUST_TRAMPOLINE, "adjust_trampoline", true);
- tmp = tree_cons (NULL_TREE, pvoid_type_node, void_list_node);
- tmp = tree_cons (NULL_TREE, size_type_node, void_list_node);
- ftype = build_function_type (pvoid_type_node, tmp);
- gfc_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 (pvoid_type_node, void_list_node);
gfc_define_builtin ("__builtin_stack_save", ftype, BUILT_IN_STACK_SAVE,
"stack_save", false);
+
tmp = tree_cons (NULL_TREE, pvoid_type_node, void_list_node);
ftype = build_function_type (void_type_node, tmp);
gfc_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 (pvoid_type_node, tmp);
+ gfc_define_builtin ("__builtin_alloca", ftype, BUILT_IN_ALLOCA,
+ "alloca", false);
}
#undef DEFINE_MATH_BUILTIN