OSDN Git Service

* fold-const.c (fold_addr_expr_with_type): Look through all
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Jun 2004 01:28:34 +0000 (01:28 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Jun 2004 01:28:34 +0000 (01:28 +0000)
valid LHS modifiers to find a base to mark addressable.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83628 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fold-const.c

index 8646991..e4f9cb1 100644 (file)
@@ -1,5 +1,8 @@
 2004-06-24  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
+       * fold-const.c (fold_addr_expr_with_type): Look through all
+       valid LHS modifiers to find a base to mark addressable.
+
        * tree.h (debug_find_tree): Add declaration.
        * tree-inline.c (debug_find_tree): Remove extern declaration.
 
index 6ef7b1a..343662a 100644 (file)
@@ -10420,8 +10420,10 @@ build_fold_addr_expr_with_type (tree t, tree ptrtype)
   else
     {
       tree base = t;
-      while (TREE_CODE (base) == COMPONENT_REF
-            || TREE_CODE (base) == ARRAY_REF)
+
+      while (handled_component_p (base)
+            || TREE_CODE (base) == REALPART_EXPR
+            || TREE_CODE (base) == IMAGPART_EXPR)
        base = TREE_OPERAND (base, 0);
       if (DECL_P (base))
        TREE_ADDRESSABLE (base) = 1;