aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-07-06 17:22:16 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-07-06 17:22:16 -0400
commitf02f35b94f650331ee0f27d3bbb0993deee8064b (patch)
treeb497376d7254c62129a02344808b590525c292bb /gcc
parentea6363a3b170a4783b2784f194c18ebfa29d1413 (diff)
downloadgcc-f02f35b94f650331ee0f27d3bbb0993deee8064b.zip
gcc-f02f35b94f650331ee0f27d3bbb0993deee8064b.tar.gz
gcc-f02f35b94f650331ee0f27d3bbb0993deee8064b.tar.bz2
re PR c++/49568 (g++.dg/torture/pr41257-2.C FAILs to link on Tru64 UNIX)
PR c++/49568 * method.c (make_thunk, use_thunk): Copy DECL_COMDAT. From-SVN: r175938
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/method.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ed94e06..8a25c89 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-06 Jason Merrill <jason@redhat.com>
+
+ PR c++/49568
+ * method.c (make_thunk, use_thunk): Copy DECL_COMDAT.
+
2011-07-05 Jason Merrill <jason@redhat.com>
PR c++/48157
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 9b9eb9a..d41a4dd 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -140,11 +140,12 @@ make_thunk (tree function, bool this_adjusting,
THUNK_VIRTUAL_OFFSET (thunk) = virtual_offset;
THUNK_ALIAS (thunk) = NULL_TREE;
- /* The thunk itself is not a constructor or destructor, even if
- the thing it is thunking to is. */
DECL_INTERFACE_KNOWN (thunk) = 1;
DECL_NOT_REALLY_EXTERN (thunk) = 1;
+ DECL_COMDAT (thunk) = DECL_COMDAT (function);
DECL_SAVED_FUNCTION_DATA (thunk) = NULL;
+ /* The thunk itself is not a constructor or destructor, even if
+ the thing it is thunking to is. */
DECL_DESTRUCTOR_P (thunk) = 0;
DECL_CONSTRUCTOR_P (thunk) = 0;
DECL_EXTERNAL (thunk) = 1;
@@ -342,6 +343,7 @@ use_thunk (tree thunk_fndecl, bool emit_p)
DECL_VISIBILITY (thunk_fndecl) = DECL_VISIBILITY (function);
DECL_VISIBILITY_SPECIFIED (thunk_fndecl)
= DECL_VISIBILITY_SPECIFIED (function);
+ DECL_COMDAT (thunk_fndecl) = DECL_COMDAT (function);
if (DECL_ONE_ONLY (function) || DECL_WEAK (function))
make_decl_one_only (thunk_fndecl, cxx_comdat_group (thunk_fndecl));