diff options
author | Mark Mitchell <mark@codesourcery.com> | 2007-02-11 18:58:05 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2007-02-11 18:58:05 +0000 |
commit | 56fd65c7d9a3fd9ab80a627eb6caf24483801ff5 (patch) | |
tree | 37425a6a59c6e2da923d37b739cbb1c65f2cfbd9 /gcc/cp/tree.c | |
parent | f57d17f1fc2f31047644ed6f18f1087f65f8f88b (diff) | |
download | gcc-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/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 78545e1..a3d11a3 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -2209,13 +2209,9 @@ cp_cannot_inline_tree_fn (tree* fnp) && lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) == NULL) return 1; - /* Don't auto-inline anything that might not be bound within - this unit of translation. - Exclude comdat functions from this rule. While they can be bound - to the other unit, they all must be the same. This is especially - important so templates can inline. */ - if (!DECL_DECLARED_INLINE_P (fn) && !(*targetm.binds_local_p) (fn) - && !DECL_COMDAT (fn)) + /* Don't auto-inline functions that might be replaced at link-time + with an alternative definition. */ + if (!DECL_DECLARED_INLINE_P (fn) && DECL_REPLACEABLE_P (fn)) { DECL_UNINLINABLE (fn) = 1; return 1; |