c++: constrained template friend class matching [PR96830]
When instantiating a constrained template friend naming an already
declared class template, tsubst_friend_class erroneously passes to
redeclare_class_template the existing template's constraints instead of
those of the friend declaration, which causes the constraint comparison
check therein to trivially succeed and we fail to diagnose legitimate
constraint mismatches.
PR c++/96830
gcc/cp/ChangeLog:
* pt.cc (redeclare_class_template): Add missing "of" in
constraint mismatch diagnostic.
(tsubst_friend_class): For an already declared class template,
substitute and pass the friend declaration's constraints to
redeclare_class_template instead of passing the existing
template's constraints.