aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-05-15 06:34:20 -0700
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 13:03:28 -0300
commit8ff3da63b8aadbda3bc8bc7c3ec0fea8bc35f524 (patch)
tree6125b3968070676c1df5d44b0bd14716593e63e1
parentd8e6d84b3c915eb485aadd1de48045fdbd5b112b (diff)
downloadgcc-8ff3da63b8aadbda3bc8bc7c3ec0fea8bc35f524.zip
gcc-8ff3da63b8aadbda3bc8bc7c3ec0fea8bc35f524.tar.gz
gcc-8ff3da63b8aadbda3bc8bc7c3ec0fea8bc35f524.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'.
-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;