summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-16 15:20:47 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-16 15:20:47 +0000
commit06a0401ba938d648062f522ec01c5e592e36ec20 (patch)
tree2e373c59f43096e04f961f5f14f75741b13b6968 /gcc
parenta868678a9443f3488180a6d9b9570d436c46f2dc (diff)
downloadgcc-06a0401ba938d648062f522ec01c5e592e36ec20.tar.gz
* tree.c (build_common_builtin_nodes): Always clear TREE_NOTHROW on
BUILT_IN_ALLOCA if stack checking is enabled. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159457 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/tree.c7
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9c1cd4d80d9..cd3a80fd952 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ * tree.c (build_common_builtin_nodes): Always clear TREE_NOTHROW on
+ BUILT_IN_ALLOCA if stack checking is enabled.
+
2010-05-16 Richard Guenther <rguenther@suse.de>
* var-tracking.c (vars_copy_1): Inline ...
@@ -33,7 +38,8 @@
2010-05-15 Jan Hubicka <jh@suse.cz>
- * ipa-prop.c (ipa_prop_read_section): Add sanity check that node is analyzed.
+ * ipa-prop.c (ipa_prop_read_section): Add sanity check that node is
+ analyzed.
* passes.c (ipa_write_summaries): Write all analyzed nodes.
2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
diff --git a/gcc/tree.c b/gcc/tree.c
index 9dbd08450cd..3c456a2f409 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);