aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorSimon Martin <simartin@users.sourceforge.net>2007-01-11 19:46:03 +0000
committerSimon Martin <simartin@gcc.gnu.org>2007-01-11 19:46:03 +0000
commit6f9f76e336e9ce7a1c070351e4d21e6b84c0e82c (patch)
tree0f3c51fe1f2b8c17b0a809798e495fd93772cedd /gcc/cp/tree.c
parentad4fe825e2765e2630c6d3c2505900c159e2e446 (diff)
downloadgcc-6f9f76e336e9ce7a1c070351e4d21e6b84c0e82c.zip
gcc-6f9f76e336e9ce7a1c070351e4d21e6b84c0e82c.tar.gz
gcc-6f9f76e336e9ce7a1c070351e4d21e6b84c0e82c.tar.bz2
re PR c++/29573 (ICE after parse error in template argument)
2007-01-11 Simon Martin <simartin@users.sourceforge.net> PR c++/29573 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees. From-SVN: r120683
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index ae3dc4c..742e090 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1709,6 +1709,21 @@ cp_tree_equal (tree t1, tree t2)
return cp_tree_equal (o1, o2);
}
+ case MODOP_EXPR:
+ {
+ tree t1_op1, t2_op1;
+
+ if (!cp_tree_equal (TREE_OPERAND (t1, 0), TREE_OPERAND (t2, 0)))
+ return false;
+
+ t1_op1 = TREE_OPERAND (t1, 1);
+ t2_op1 = TREE_OPERAND (t2, 1);
+ if (TREE_CODE (t1_op1) != TREE_CODE (t2_op1))
+ return false;
+
+ return cp_tree_equal (TREE_OPERAND (t1, 2), TREE_OPERAND (t2, 2));
+ }
+
case PTRMEM_CST:
/* Two pointer-to-members are the same if they point to the same
field or function in the same class. */