diff options
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 46e64986491..0a9f5d518d3 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -20918,8 +20918,13 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict, case INDIRECT_REF: if (REFERENCE_REF_P (parm)) { + bool pexp = PACK_EXPANSION_P (arg); + if (pexp) + arg = PACK_EXPANSION_PATTERN (arg); if (REFERENCE_REF_P (arg)) arg = TREE_OPERAND (arg, 0); + if (pexp) + arg = make_pack_expansion (arg); return unify (tparms, targs, TREE_OPERAND (parm, 0), arg, strict, explain_p); } |