On 5/14/20 3:17 PM, Arseny Solokha wrote:
Hi,

-  if (TREE_CODE (nt) == TREE_VEC)
+  if (TREE_CODE (nt) == TREE_VEC || TREE_CODE (nt) == TREE_VEC)

Shouldn't there be

   if (TREE_CODE (ot) == TREE_VEC || TREE_CODE (nt) == TREE_VEC)

+  else if (TYPE_P (nt) || TYPE_P (nt))

And here:

   else if (TYPE_P (ot) || TYPE_P (nt))

Whoops, I flubbed that.  Fixed thusly.

In other news, someone's reading my patches!  Seriously, thanks!

nathan

--
Nathan Sidwell
2020-05-15  Nathan Sidwell  <nat...@acm.org>

	* pt.c (template_args_equal): Fix thinkos in previous 'cleanup'.

diff --git i/gcc/cp/pt.c w/gcc/cp/pt.c
index 2a0b18f5517..bfeeebc2b38 100644
--- i/gcc/cp/pt.c
+++ w/gcc/cp/pt.c
@@ -9087,7 +9087,7 @@ template_args_equal (tree ot, tree nt, bool partial_order /* = false */)
   if (class_nttp_const_wrapper_p (ot))
     ot = TREE_OPERAND (ot, 0);
 
-  if (TREE_CODE (nt) == TREE_VEC || TREE_CODE (nt) == TREE_VEC)
+  if (TREE_CODE (nt) == TREE_VEC || TREE_CODE (ot) == TREE_VEC)
     /* For member templates */
     return TREE_CODE (ot) == TREE_CODE (nt) && comp_template_args (ot, nt);
   else if (PACK_EXPANSION_P (ot) || PACK_EXPANSION_P (nt))
@@ -9100,7 +9100,7 @@ template_args_equal (tree ot, tree nt, bool partial_order /* = false */)
     return cp_tree_equal (ot, nt);
   else if (TREE_CODE (ot) == ARGUMENT_PACK_SELECT)
     gcc_unreachable ();
-  else if (TYPE_P (nt) || TYPE_P (nt))
+  else if (TYPE_P (nt) || TYPE_P (ot))
     {
       if (!(TYPE_P (nt) && TYPE_P (ot)))
 	return false;

Reply via email to