summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivopts.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-08 23:10:00 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-08 23:10:00 +0000
commit34e9b3c70d0cdc0b9ef1344a49110ebf4337aed5 (patch)
tree6a2ee53b314ca031061181f3fc11e2218d380be3 /gcc/tree-ssa-loop-ivopts.c
parent3f8217c21938bc1d867bd2a0c4dbb41e836aaf70 (diff)
downloadgcc-34e9b3c70d0cdc0b9ef1344a49110ebf4337aed5.tar.gz
* tree-ssa-loop-ivopts.c (may_be_nonaddressable_p) <VIEW_CONVERT_EXPR>:
Make case self-contained. <ARRAY_REF>: Test TYPE_NONALIASED_COMPONENT flag. ada/ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_String_Literal_Subtype>: Set TYPE_NONALIASED_COMPONENT on the array type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144021 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r--gcc/tree-ssa-loop-ivopts.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index ca1ab98b85a..a1f5c47572d 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -1562,15 +1562,14 @@ may_be_nonaddressable_p (tree expr)
and make them look addressable. After some processing the
non-addressability may be uncovered again, causing ADDR_EXPRs
of inappropriate objects to be built. */
- if (is_gimple_reg (TREE_OPERAND (expr, 0))
- || !is_gimple_addressable (TREE_OPERAND (expr, 0)))
- return true;
-
- /* ... fall through ... */
+ return is_gimple_reg (TREE_OPERAND (expr, 0))
+ || !is_gimple_addressable (TREE_OPERAND (expr, 0))
+ || may_be_nonaddressable_p (TREE_OPERAND (expr, 0));
case ARRAY_REF:
case ARRAY_RANGE_REF:
- return may_be_nonaddressable_p (TREE_OPERAND (expr, 0));
+ return TYPE_NONALIASED_COMPONENT (TREE_TYPE (TREE_OPERAND (expr, 0)))
+ || may_be_nonaddressable_p (TREE_OPERAND (expr, 0));
CASE_CONVERT:
return true;