aboutsummaryrefslogtreecommitdiff
path: root/libobjc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2023-09-18 14:54:45 -0400
committerPatrick Palka <ppalka@redhat.com>2023-09-18 14:54:45 -0400
commit80968d5f4683ffb50dbe8051d10f754d5fd00dfb (patch)
tree288034bb500183048407366ba738ec63e84d04b1 /libobjc
parent6e92a6a2a72d3b7a5e1b29042d8a6a43fe1085aa (diff)
downloadgcc-80968d5f4683ffb50dbe8051d10f754d5fd00dfb.zip
gcc-80968d5f4683ffb50dbe8051d10f754d5fd00dfb.tar.gz
gcc-80968d5f4683ffb50dbe8051d10f754d5fd00dfb.tar.bz2
c++: optimize unifying nested templated classes [PR89231]
Since the LHS of a qualified-id is a non-deduced context, it effectively means we can't deduce from outer template arguments of a class template specialization. And checking for equality between the TI_TEMPLATE of a class specialization parm/arg already implies that the outer template arguments are the same. Hence recursing into outer template arguments during unification of class specializations is redundant, so this patch makes unify recurse only into innermost arguments. This incidentally fixes the testcase from PR89231 because there more_specialized_partial_inst wrongly considers the two partial specializations to be unordered ultimately because unify for identical parm=arg=A<Ps...>::Collect<N...> gets confused when it recurses into parm=arg={Ps...} since Ps is outside the (innermost) level of tparms that we're actually deducing. PR c++/89231 gcc/cp/ChangeLog: * pt.cc (try_class_unification): Strengthen TI_TEMPLATE equality test by not calling most_general_template. Only unify the innermost levels of template arguments. (unify) <case CLASS_TYPE>: Only unify the innermost levels of template arguments, and only if the template is primary. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/variadic-partial3.C: New test.
Diffstat (limited to 'libobjc')
0 files changed, 0 insertions, 0 deletions