aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2007-02-11 18:58:05 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2007-02-11 18:58:05 +0000
commit56fd65c7d9a3fd9ab80a627eb6caf24483801ff5 (patch)
tree37425a6a59c6e2da923d37b739cbb1c65f2cfbd9 /gcc/except.c
parentf57d17f1fc2f31047644ed6f18f1087f65f8f88b (diff)
downloadgcc-56fd65c7d9a3fd9ab80a627eb6caf24483801ff5.zip
gcc-56fd65c7d9a3fd9ab80a627eb6caf24483801ff5.tar.gz
gcc-56fd65c7d9a3fd9ab80a627eb6caf24483801ff5.tar.bz2
re PR target/29487 (Shared libstdc++ fails to link)
PR target/29487 * tree.h (DECL_REPLACEABLE_P): New macro. * except.c (set_nothrow_function_flags): Likewise. PR target/29487 * decl.c (finish_function): Use DECL_REPLACEABLE. * tree.c (cp_cannot_inline_tree_fn): Likewise. PR c++/29487 * g++.dg/eh/weak1-C: New test. * g++.dg/eh/weak1-a.cc: Likewise. * g++.dg/eh/comdat1.C: Likewise. From-SVN: r121819
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;