diff options
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 527fe04f5a8..4143bb121d9 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -974,7 +974,10 @@ retrieve_specialization (tree tmpl, tree args, hashval_t hash) for (fns = VEC_index (tree, methods, idx); fns; fns = OVL_NEXT (fns)) { tree fn = OVL_CURRENT (fns); - if (DECL_TEMPLATE_INFO (fn) && DECL_TI_TEMPLATE (fn) == tmpl) + if (DECL_TEMPLATE_INFO (fn) && DECL_TI_TEMPLATE (fn) == tmpl + /* using-declarations can add base methods to the method vec, + and we don't want those here. */ + && DECL_CONTEXT (fn) == class_specialization) return fn; } return NULL_TREE; |