aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2010-05-16 15:20:47 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2010-05-16 15:20:47 +0000
commit29d1748506a81fedf0659c07a67905b883d6e808 (patch)
tree2e373c59f43096e04f961f5f14f75741b13b6968 /gcc/tree.c
parenta6590c31ac2964fe8a416c4ef3f82a751f98b6ab (diff)
downloadgcc-29d1748506a81fedf0659c07a67905b883d6e808.zip
gcc-29d1748506a81fedf0659c07a67905b883d6e808.tar.gz
gcc-29d1748506a81fedf0659c07a67905b883d6e808.tar.bz2
tree.c (build_common_builtin_nodes): Always clear TREE_NOTHROW on BUILT_IN_ALLOCA if stack checking is enabled.
* tree.c (build_common_builtin_nodes): Always clear TREE_NOTHROW on BUILT_IN_ALLOCA if stack checking is enabled. From-SVN: r159457
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 9dbd084..3c456a2 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -9083,10 +9083,13 @@ build_common_builtin_nodes (void)
tmp = tree_cons (NULL_TREE, size_type_node, void_list_node);
ftype = build_function_type (ptr_type_node, tmp);
local_define_builtin ("__builtin_alloca", ftype, BUILT_IN_ALLOCA,
- "alloca",
- ECF_MALLOC | (flag_stack_check ? 0 : ECF_NOTHROW));
+ "alloca", ECF_MALLOC | ECF_NOTHROW);
}
+ /* If we're checking the stack, `alloca' can throw. */
+ if (flag_stack_check)
+ TREE_NOTHROW (built_in_decls[BUILT_IN_ALLOCA]) = 0;
+
tmp = tree_cons (NULL_TREE, ptr_type_node, void_list_node);
tmp = tree_cons (NULL_TREE, ptr_type_node, tmp);
tmp = tree_cons (NULL_TREE, ptr_type_node, tmp);