aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@gcc.gnu.org>2005-12-29 16:38:26 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2005-12-29 16:38:26 +0000
commitbf2f234e754b1a820d8b33b8910d157d3c7e0edd (patch)
tree26302b5481e79e9084d851184342c5d76e636dc7 /gcc/cp/method.c
parent42b67c06ed335cf1c6f0cf9a3751ea35099393f4 (diff)
downloadgcc-bf2f234e754b1a820d8b33b8910d157d3c7e0edd.zip
gcc-bf2f234e754b1a820d8b33b8910d157d3c7e0edd.tar.gz
gcc-bf2f234e754b1a820d8b33b8910d157d3c7e0edd.tar.bz2
varasm.c (get_section): Use gcc_assert.
* varasm.c (get_section): Use gcc_assert. cp: * method.c (make_thunk): Don't set comdat_linkage here. (use_thunk): Make thunk one only here, if thunk target is DECL_ONE_ONLY. testsuite: * g++.dg/abi/thunk3.C: New. * g++.dg/abi/thunk4.C: New. From-SVN: r109149
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index f3c86d3..250c66d 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -137,8 +137,6 @@ make_thunk (tree function, bool this_adjusting,
TREE_READONLY (thunk) = TREE_READONLY (function);
TREE_THIS_VOLATILE (thunk) = TREE_THIS_VOLATILE (function);
TREE_PUBLIC (thunk) = TREE_PUBLIC (function);
- if (flag_weak)
- comdat_linkage (thunk);
SET_DECL_THUNK_P (thunk, this_adjusting);
THUNK_TARGET (thunk) = function;
THUNK_FIXED_OFFSET (thunk) = d;
@@ -381,8 +379,8 @@ use_thunk (tree thunk_fndecl, bool emit_p)
DECL_VISIBILITY (thunk_fndecl) = DECL_VISIBILITY (function);
DECL_VISIBILITY_SPECIFIED (thunk_fndecl)
= DECL_VISIBILITY_SPECIFIED (function);
- if (flag_weak && TREE_PUBLIC (thunk_fndecl))
- comdat_linkage (thunk_fndecl);
+ if (DECL_ONE_ONLY (function))
+ make_decl_one_only (thunk_fndecl);
if (flag_syntax_only)
{