summaryrefslogtreecommitdiff
path: root/gcc/tree-gimple.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-gimple.c')
-rw-r--r--gcc/tree-gimple.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/gcc/tree-gimple.c b/gcc/tree-gimple.c
index 36e4393d2b3..b1f08dfee4a 100644
--- a/gcc/tree-gimple.c
+++ b/gcc/tree-gimple.c
@@ -602,27 +602,19 @@ rationalize_compound_expr (tree top)
tree
get_base_address (tree t)
{
- do
- {
- if (SSA_VAR_P (t)
- || TREE_CODE (t) == STRING_CST
- || TREE_CODE (t) == CONSTRUCTOR
- || TREE_CODE (t) == INDIRECT_REF)
- return t;
-
- if (TREE_CODE (t) == REALPART_EXPR || TREE_CODE (t) == IMAGPART_EXPR)
- t = TREE_OPERAND (t, 0);
- else if (handled_component_p (t))
- t = get_base_address (TREE_OPERAND (t, 0));
- else
- return NULL_TREE;
- }
- while (t);
-
- return t;
+ while (TREE_CODE (t) == REALPART_EXPR || TREE_CODE (t) == IMAGPART_EXPR
+ || handled_component_p (t))
+ t = TREE_OPERAND (t, 0);
+
+ if (SSA_VAR_P (t)
+ || TREE_CODE (t) == STRING_CST
+ || TREE_CODE (t) == CONSTRUCTOR
+ || TREE_CODE (t) == INDIRECT_REF)
+ return t;
+ else
+ return NULL_TREE;
}
-
void
recalculate_side_effects (tree t)
{