aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-05-15 06:34:20 -0700
committerNathan Sidwell <nathan@acm.org>2020-05-15 06:34:20 -0700
commit271e3da859f92e32e0f3a8779fb6ac0c2a7909c4 (patch)
tree93c1e753775f792d815f3061a7f9efe7f949a71c /gcc
parent584a3c080bbd6e64131fa53771c7424bcf9d21fa (diff)
downloadgcc-271e3da859f92e32e0f3a8779fb6ac0c2a7909c4.zip
gcc-271e3da859f92e32e0f3a8779fb6ac0c2a7909c4.tar.gz
gcc-271e3da859f92e32e0f3a8779fb6ac0c2a7909c4.tar.bz2
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'.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/pt.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 0a32052..37705f9 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2020-05-15 Nathan Sidwell <nathan@acm.org>
+
+ * pt.c (template_args_equal): Fix thinkos in previous 'cleanup'.
+
2020-05-14 Jason Merrill <jason@redhat.com>
PR c++/93901
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 2a0b18f..bfeeebc 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;