aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/repo.c
diff options
context:
space:
mode:
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 6dfcafc..f2f9591 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);