diff options
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 5b0d0b696c2..28bb7853198 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -14086,7 +14086,7 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl) { /* First try name lookup to find the instantiation. */ r = lookup_name (DECL_NAME (t)); - if (r) + if (r && !is_capture_proxy (r)) { /* Make sure that the one we found is the one we want. */ tree ctx = DECL_CONTEXT (t); |