diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-25 18:30:09 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-25 18:30:09 +0000 |
commit | 5f4cbfb837abe65a85f3cd6e169f671b99ea25ee (patch) | |
tree | 7c8cf6d03b810dc8e85375f82476d9c4c4b891b9 /gcc/tree-gimple.c | |
parent | 396ab50c2aa95b6e6248f249827d4108f777c4f0 (diff) | |
download | gcc-5f4cbfb837abe65a85f3cd6e169f671b99ea25ee.tar.gz |
* tree-dfa.c (get_virtual_var): Merge real/imaginary parts with
handled_component_p handling.
* tree-gimple.c (get_base_address): Likewise and fix typo that
caused both recursion and looping.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83669 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-gimple.c')
-rw-r--r-- | gcc/tree-gimple.c | 30 |
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) { |