From: Nathan Sidwell Date: Fri, 15 May 2020 13:34:20 +0000 (-0700) Subject: c++: Fix thinkos in template_args_equal change. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=271e3da859f92e32e0f3a8779fb6ac0c2a7909c4;p=gcc.git c++: Fix thinkos in template_args_equal change. Arseny Solokha noticed I'd flubbed this patch, and it was not saying what I thought it was saying. Unfortunately that didn't break anything (otherwise I'd've noticed). Fixed thusly. * pt.c (template_args_equal): Fix thinkos in previous 'cleanup'. --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0a3205272a5..37705f9f93d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2020-05-15 Nathan Sidwell + + * pt.c (template_args_equal): Fix thinkos in previous 'cleanup'. + 2020-05-14 Jason Merrill PR c++/93901 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 2a0b18f5517..bfeeebc2b38 100644 --- a/gcc/cp/pt.c +++ b/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;