aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2020-06-03 16:37:24 -0400
committerPatrick Palka <ppalka@redhat.com>2020-06-03 16:40:34 -0400
commitc06280ac4c34b0aff8cfa2e74ae8c7afd759d52f (patch)
tree23209ade8805880d036eb64aed9ecc4f95270a42 /gcc/cp
parentaee69073cdb8086d393f12474c6177e75467ceaa (diff)
downloadgcc-c06280ac4c34b0aff8cfa2e74ae8c7afd759d52f.zip
gcc-c06280ac4c34b0aff8cfa2e74ae8c7afd759d52f.tar.gz
gcc-c06280ac4c34b0aff8cfa2e74ae8c7afd759d52f.tar.bz2
c++: more constrained nested partial specialization
When checking that a constrained partial specialization is more constrained than the primary template, we pass only the innermost level of generic template arguments to strictly_subsumes. This leads to us doing a nonsensical substitution from normalize_concept_check if the full set of template arguments has multiple levels, and it ultimately causes strictly_subsumes to sometimes erroneously return false as in the testcase below. gcc/cp/ChangeLog: * pt.c (process_partial_specialization): Pass the full set of generic template arguments to strictly_subsumes. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-partial-spec8.C: New test.
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/pt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index f5d1442..c07a48f 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -5062,7 +5062,7 @@ process_partial_specialization (tree decl)
if (comp_template_args (inner_args, INNERMOST_TEMPLATE_ARGS (main_args))
&& (!flag_concepts
|| !strictly_subsumes (current_template_constraints (),
- inner_args, maintmpl)))
+ main_args, maintmpl)))
{
if (!flag_concepts)
error ("partial specialization %q+D does not specialize "