summaryrefslogtreecommitdiff
path: root/gcc/tree-nested.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-25 20:33:09 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-25 20:33:09 +0000
commit9124cf12534fee0a6e0a902a52c8eea96de909bc (patch)
tree3d9c5cfe771b86fe61f70f6241520331fea18e67 /gcc/tree-nested.c
parentd373b82f0b909271c88480f13c8885782361f9c7 (diff)
downloadgcc-9124cf12534fee0a6e0a902a52c8eea96de909bc.tar.gz
* tree-nested.c (build_addr): Merge real/imagpart with
handled_component_p. (convert_nonlocal_reference, convert_local_reference): Process extra args to COMPONENT_REF and ARRAY_REF. * tree-outof-ssa.c (discover_nonconstant_array_refs_r): Check for lower bound and field offset being constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83677 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r--gcc/tree-nested.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
index 1f32e1f60f9..10bf1ce091c 100644
--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -158,11 +158,9 @@ build_addr (tree exp)
{
tree base = exp;
- if (TREE_CODE (base) == REALPART_EXPR || TREE_CODE (base) == IMAGPART_EXPR)
+ while (TREE_CODE (base) == REALPART_EXPR || TREE_CODE (base) == IMAGPART_EXPR
+ || handled_component_p (base))
base = TREE_OPERAND (base, 0);
- else
- while (handled_component_p (base))
- base = TREE_OPERAND (base, 0);
if (DECL_P (base))
TREE_ADDRESSABLE (base) = 1;
@@ -797,7 +795,6 @@ convert_nonlocal_reference (tree *tp, int *walk_subtrees, void *data)
}
break;
- case COMPONENT_REF:
case REALPART_EXPR:
case IMAGPART_EXPR:
wi->val_only = false;
@@ -805,6 +802,13 @@ convert_nonlocal_reference (tree *tp, int *walk_subtrees, void *data)
wi->val_only = true;
break;
+ case COMPONENT_REF:
+ wi->val_only = false;
+ walk_tree (&TREE_OPERAND (t, 0), convert_nonlocal_reference, wi, NULL);
+ wi->val_only = true;
+ walk_tree (&TREE_OPERAND (t, 2), convert_nonlocal_reference, wi, NULL);
+ break;
+
case ARRAY_REF:
case ARRAY_RANGE_REF:
wi->val_only = false;
@@ -932,7 +936,6 @@ convert_local_reference (tree *tp, int *walk_subtrees, void *data)
tsi_link_after (&wi->tsi, x, TSI_SAME_STMT);
break;
- case COMPONENT_REF:
case REALPART_EXPR:
case IMAGPART_EXPR:
wi->val_only = false;
@@ -940,6 +943,13 @@ convert_local_reference (tree *tp, int *walk_subtrees, void *data)
wi->val_only = true;
break;
+ case COMPONENT_REF:
+ wi->val_only = false;
+ walk_tree (&TREE_OPERAND (t, 0), convert_local_reference, wi, NULL);
+ wi->val_only = true;
+ walk_tree (&TREE_OPERAND (t, 2), convert_local_reference, wi, NULL);
+ break;
+
case ARRAY_REF:
case ARRAY_RANGE_REF:
wi->val_only = false;