summaryrefslogtreecommitdiffstats
path: root/gcc/alias.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 24b4605822d..cc74ee8a187 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -342,13 +342,13 @@ objects_must_conflict_p (tree t1, tree t2)
static tree
find_base_decl (tree t)
{
- tree d0, d1, d2;
+ tree d0, d1;
if (t == 0 || t == error_mark_node || ! POINTER_TYPE_P (TREE_TYPE (t)))
return 0;
/* If this is a declaration, return it. */
- if (TREE_CODE_CLASS (TREE_CODE (t)) == 'd')
+ if (DECL_P (t))
return t;
/* Handle general expressions. It would be nice to deal with
@@ -356,10 +356,10 @@ find_base_decl (tree t)
same, then `a->f' and `b->f' are also the same. */
switch (TREE_CODE_CLASS (TREE_CODE (t)))
{
- case '1':
+ case tcc_unary:
return find_base_decl (TREE_OPERAND (t, 0));
- case '2':
+ case tcc_binary:
/* Return 0 if found in neither or both are the same. */
d0 = find_base_decl (TREE_OPERAND (t, 0));
d1 = find_base_decl (TREE_OPERAND (t, 1));
@@ -372,21 +372,6 @@ find_base_decl (tree t)
else
return 0;
- case '3':
- d0 = find_base_decl (TREE_OPERAND (t, 0));
- d1 = find_base_decl (TREE_OPERAND (t, 1));
- d2 = find_base_decl (TREE_OPERAND (t, 2));
-
- /* Set any nonzero values from the last, then from the first. */
- if (d1 == 0) d1 = d2;
- if (d0 == 0) d0 = d1;
- if (d1 == 0) d1 = d0;
- if (d2 == 0) d2 = d1;
-
- /* At this point all are nonzero or all are zero. If all three are the
- same, return it. Otherwise, return zero. */
- return (d0 == d1 && d1 == d2) ? d0 : 0;
-
default:
return 0;
}
OpenPOWER on IntegriCloud