aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/tree.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 65edb9c..6dd6137 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2011-02-03 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/47398
+ * tree.c (cp_tree_equal)<TEMPLATE_PARM_INDEX>: Take the number of
+ template parameters in account.
+
2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
PR c++/46890
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 1a1f150..d62d242 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -2176,6 +2176,9 @@ cp_tree_equal (tree t1, tree t2)
BASELINK_FUNCTIONS (t2)));
case TEMPLATE_PARM_INDEX:
+ if (TEMPLATE_PARM_NUM_SIBLINGS (t1)
+ != TEMPLATE_PARM_NUM_SIBLINGS (t2))
+ return false;
return (TEMPLATE_PARM_IDX (t1) == TEMPLATE_PARM_IDX (t2)
&& TEMPLATE_PARM_LEVEL (t1) == TEMPLATE_PARM_LEVEL (t2)
&& (TEMPLATE_PARM_PARAMETER_PACK (t1)