summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-10 08:27:02 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-10 08:27:02 +0000
commitcf7c451605a21e4b39d3cdf7a3b2fdc9017a52a5 (patch)
tree39e8cda86d252657f4fe7508add31edc797fa766
parent3dbfe3e4399f75b0faef2f734f4cb2983988c93c (diff)
downloadgcc-cf7c451605a21e4b39d3cdf7a3b2fdc9017a52a5.tar.gz
2006-10-10 Richard Guenther <rguenther@suse.de>
PR rtl-optimization/29323 * except.c (set_nothrow_function_flags): For functions that do not bind local bail out early. * decl.c (finish_function): Set TREE_NOTHROW only for functions that bind local. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117598 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl.c3
-rw-r--r--gcc/except.c3
4 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6f0fce1a2ac..b8c8d40501c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-10 Richard Guenther <rguenther@suse.de>
+
+ PR rtl-optimization/29323
+ * except.c (set_nothrow_function_flags): For functions
+ that do not bind local bail out early.
+
2006-10-10 Ben Elliston <bje@au.ibm.com>
* doc/invoke.texi (RS/6000 and PowerPC Options): Add -m to the
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 615f53c49e8..253c578c30d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-10 Richard Guenther <rguenther@suse.de>
+
+ PR rtl-optimization/29323
+ * decl.c (finish_function): Set TREE_NOTHROW only for
+ functions that bind local.
+
2006-10-09 Richard Henderson <rth@redhat.com>
Revert emutls patch.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 84f2aaa49b3..96ecc8691d7 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -11096,7 +11096,8 @@ finish_function (int flags)
/* If this function can't throw any exceptions, remember that. */
if (!processing_template_decl
&& !cp_function_chain->can_throw
- && !flag_non_call_exceptions)
+ && !flag_non_call_exceptions
+ && targetm.binds_local_p (fndecl))
TREE_NOTHROW (fndecl) = 1;
/* This must come after expand_function_end because cleanups might
diff --git a/gcc/except.c b/gcc/except.c
index b344087672b..30dafbb8073 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -2787,6 +2787,9 @@ set_nothrow_function_flags (void)
{
rtx insn;
+ if (!targetm.binds_local_p (current_function_decl))
+ return 0;
+
TREE_NOTHROW (current_function_decl) = 1;
/* Assume cfun->all_throwers_are_sibcalls until we encounter