diff options
author | Patrick Palka <ppalka@redhat.com> | 2025-05-15 11:07:53 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2025-05-15 11:07:53 -0400 |
commit | 0c430503f2849ebb20105695b8ad40d43d797c7b (patch) | |
tree | 77dfa4ff4ebc1509f9dcf5eea8026cde93b8c4d6 /libstdc++-v3/testsuite/std | |
parent | 9a2083f025fae3559474b961943484d764c2e6dd (diff) | |
download | gcc-0c430503f2849ebb20105695b8ad40d43d797c7b.zip gcc-0c430503f2849ebb20105695b8ad40d43d797c7b.tar.gz gcc-0c430503f2849ebb20105695b8ad40d43d797c7b.tar.bz2 |
c++: unifying specializations of non-primary tmpls [PR120161]
Here unification of P=Wrap<int>::type, A=Wrap<long>::type wrongly
succeeds ever since r14-4112 which made the RECORD_TYPE case of unify
no longer recurse into template arguments for non-primary templates
(since they're a non-deduced context) and so the int/long mismatch that
makes the two types distinct goes unnoticed.
In the case of (comparing specializations of) a non-primary template,
unify should still go on to compare the types directly before returning
success.
PR c++/120161
gcc/cp/ChangeLog:
* pt.cc (unify) <case RECORD_TYPE>: When comparing specializations
of a non-primary template, still perform a type comparison.
gcc/testsuite/ChangeLog:
* g++.dg/template/unify13.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'libstdc++-v3/testsuite/std')
0 files changed, 0 insertions, 0 deletions