summaryrefslogtreecommitdiff
path: root/gcc/cp/repo.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-06 03:15:33 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-06 03:15:33 +0000
commit3ef20b613c43f71520e20c9a31814b51dc59835d (patch)
treef99ffcef61eba4bd28518b2193f2fe8f16f1a224 /gcc/cp/repo.c
parentda1ac2c9df13df46525460c0120949731f74f00c (diff)
downloadgcc-3ef20b613c43f71520e20c9a31814b51dc59835d.tar.gz
* pt.c (instantiate_decl): Tell the repository code about the
clones, not the cloned functions. * repo.c (repo_template_used): Explicitly instantiate the cloned function, not the clones. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42931 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/repo.c')
-rw-r--r--gcc/cp/repo.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c
index 6dfcafc24f3..f2f95919d56 100644
--- a/gcc/cp/repo.c
+++ b/gcc/cp/repo.c
@@ -137,7 +137,13 @@ repo_template_used (t)
else if (DECL_P (t))
{
if (IDENTIFIER_REPO_CHOSEN (id))
- mark_decl_instantiated (t, 0);
+ /* It doesn't make sense to instantiate a clone, so we
+ instantiate the cloned function instead. Note that this
+ approach will not work correctly if collect2 assigns
+ different clones to different files -- but it shouldn't. */
+ mark_decl_instantiated (DECL_CLONED_FUNCTION_P (t)
+ ? DECL_CLONED_FUNCTION (t) : t,
+ 0);
}
else
my_friendly_abort (1);