summaryrefslogtreecommitdiff
path: root/gcc/cp/name-lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r--gcc/cp/name-lookup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 172ec820b4d..7ad65b89599 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -5393,7 +5393,7 @@ add_function (struct arg_lookup *k, tree fn)
function templates are ignored. */;
else if (k->fn_set && k->fn_set->add (fn))
/* It's already in the list. */;
- else if (!k->functions)
+ else if (!k->functions && TREE_CODE (fn) != TEMPLATE_DECL)
k->functions = fn;
else if (fn == k->functions)
;