aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/except.c b/gcc/except.c
index 9f40dc4..dc51079 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -2785,7 +2785,10 @@ set_nothrow_function_flags (void)
{
rtx insn;
- if (!targetm.binds_local_p (current_function_decl))
+ /* If we don't know that this implementation of the function will
+ actually be used, then we must not set TREE_NOTHROW, since
+ callers must not assume that this function does not throw. */
+ if (DECL_REPLACEABLE_P (current_function_decl))
return 0;
TREE_NOTHROW (current_function_decl) = 1;