diff options
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index c51e42d..c8e6f0c 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -2745,20 +2745,8 @@ cp_tree_equal (tree t1, tree t2) if (!t1 || !t2) return false; - for (code1 = TREE_CODE (t1); - CONVERT_EXPR_CODE_P (code1) - || code1 == NON_LVALUE_EXPR; - code1 = TREE_CODE (t1)) - t1 = TREE_OPERAND (t1, 0); - for (code2 = TREE_CODE (t2); - CONVERT_EXPR_CODE_P (code2) - || code2 == NON_LVALUE_EXPR; - code2 = TREE_CODE (t2)) - t2 = TREE_OPERAND (t2, 0); - - /* They might have become equal now. */ - if (t1 == t2) - return true; + code1 = TREE_CODE (t1); + code2 = TREE_CODE (t2); if (code1 != code2) return false; @@ -2996,6 +2984,9 @@ cp_tree_equal (tree t1, tree t2) case DYNAMIC_CAST_EXPR: case IMPLICIT_CONV_EXPR: case NEW_EXPR: + CASE_CONVERT: + case NON_LVALUE_EXPR: + case VIEW_CONVERT_EXPR: if (!same_type_p (TREE_TYPE (t1), TREE_TYPE (t2))) return false; /* Now compare operands as usual. */ |