aboutsummaryrefslogtreecommitdiff
path: root/libphobos/libdruntime/gcc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2022-04-25 21:46:56 -0400
committerPatrick Palka <ppalka@redhat.com>2022-04-25 21:46:56 -0400
commit288e4c64f6b4806358aabc9b99b2fba72bf04bf6 (patch)
tree5f328ab3507d22193c963a86c483f009573a20f6 /libphobos/libdruntime/gcc
parent98de0da6035771b5fd9185f2a2c53dd65581b886 (diff)
downloadgcc-288e4c64f6b4806358aabc9b99b2fba72bf04bf6.zip
gcc-288e4c64f6b4806358aabc9b99b2fba72bf04bf6.tar.gz
gcc-288e4c64f6b4806358aabc9b99b2fba72bf04bf6.tar.bz2
c++: partial ordering with dependent NTTP type [PR105289]
Here ever since r11-6483-ge2e2f3f2c9400f we're rejecting and crashing on (respectively) two testcases that we used to accept in C++17 mode since r8-1437-g3da557ec145823. Both testcases declare a partial specialization of a primary template that has an NTTP with dependent type, and the validity of these partial specializations is unclear and the subject of PR86193 / CWG 455. So for now, this minimal patch just aims to fix the crash in the second testcase. During deduction, when checking whether the type of an NTTP uses still-undeduced parameters, we were incorrectly substituting into the previously substituted type instead of into its original type. In passing this patch also downgrades the "not more specialized" diagnostic from a permerror to a pedwarn. PR c++/105289 PR c++/86193 gcc/cp/ChangeLog: * pt.cc (process_partial_specialization): Downgrade "partial specialization isn't more specialized" diagnostic from permerror to an on-by-default pedwarn. (unify) <case TEMPLATE_PARM_INDEX>: When substituting into the NTTP type a second time, use the original type not the substituted type. gcc/testsuite/ChangeLog: * g++.dg/template/partial-specialization11.C: New test. * g++.dg/template/partial-specialization12.C: New test.
Diffstat (limited to 'libphobos/libdruntime/gcc')
0 files changed, 0 insertions, 0 deletions