aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-09-11 08:32:29 +0000
committerRichard Guenther <rguenther@suse.de>2012-09-11 08:32:29 +0000
commit62d9ed7397d90b8a8f45af80c650c74c6d0dab4d (patch)
tree98c427e048e3281aefa608f46fb037c66bd0f9e8 /gcc/gimple.c
parentdb2dee905429a4d04993c99bf398b1f1fe6a66c3 (diff)
2012-09-11 Richard Guenther <rguenther@suse.de>
PR middle-end/54515 * gimple.c (get_base_address): Do not return NULL_TREE apart from for WITH_SIZE_EXPR. * gimple-fold.c (canonicalize_constructor_val): Do not call get_base_address when not necessary. * g++.dg/tree-ssa/pr54515.C: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@191174 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 88fa7627e84..f639869e726 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -2878,16 +2878,12 @@ get_base_address (tree t)
&& TREE_CODE (TREE_OPERAND (t, 0)) == ADDR_EXPR)
t = TREE_OPERAND (TREE_OPERAND (t, 0), 0);
- if (TREE_CODE (t) == SSA_NAME
- || DECL_P (t)
- || TREE_CODE (t) == STRING_CST
- || TREE_CODE (t) == CONSTRUCTOR
- || INDIRECT_REF_P (t)
- || TREE_CODE (t) == MEM_REF
- || TREE_CODE (t) == TARGET_MEM_REF)
- return t;
- else
+ /* ??? Either the alias oracle or all callers need to properly deal
+ with WITH_SIZE_EXPRs before we can look through those. */
+ if (TREE_CODE (t) == WITH_SIZE_EXPR)
return NULL_TREE;
+
+ return t;
}
void