]> gcc.gnu.org Git - gcc.git/commitdiff
re PR middle-end/17885 (gimplifing of volatile &a->)
authorRichard Henderson <rth@redhat.com>
Tue, 19 Oct 2004 17:24:46 +0000 (10:24 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 19 Oct 2004 17:24:46 +0000 (10:24 -0700)
        PR middle-end/17885
        * tree.c (recompute_tree_invarant_for_addr_expr): Always poll address
        of INDIRECT_REF.

From-SVN: r89280

gcc/ChangeLog
gcc/tree.c

index d4e95c14179c6f53846c8776e3e94417ffc0e8ee..6bf70ad6a96c3c33413f3e790c2e170deb59d3ce 100644 (file)
@@ -1,3 +1,9 @@
+2004-10-19  Richard Hendeson  <rth@redhat.com>
+
+       PR middle-end/17885
+       * tree.c (recompute_tree_invarant_for_addr_expr): Always poll address
+       of INDIRECT_REF.
+
 2004-10-19  Kazu Hirata  <kazu@cs.umass.edu>
 
        * tree-cfg.c (thread_jumps): Use a do-while loop instead of a
index 26b5f1b39ad1e2a2455fd4dde3e4f3efa29653a4..e07bd4799087f269cfa3785f6bd88a36815e3d47 100644 (file)
@@ -2311,16 +2311,13 @@ do { tree _node = (NODE); \
     }
 
   /* Now see what's inside.  If it's an INDIRECT_REF, copy our properties from
-     it.  If it's a decl, it's invariant and constant if the decl is static.
-     It's also invariant if it's a decl in the current function.  (Taking the
-     address of a volatile variable is not volatile.)  If it's a constant,
-     the address is both invariant and constant.  Otherwise it's neither.  */
+     the address, since &(*a)->b is a form of addition.  If it's a decl, it's
+     invariant and constant if the decl is static.  It's also invariant if it's
+     a decl in the current function.  Taking the address of a volatile variable
+     is not volatile.  If it's a constant, the address is both invariant and
+     constant.  Otherwise it's neither.  */
   if (TREE_CODE (node) == INDIRECT_REF)
-    {
-      /* If this is &((T*)0)->field, then this is a form of addition.  */
-      if (TREE_CODE (TREE_OPERAND (node, 0)) != INTEGER_CST)
-       UPDATE_TITCSE (node);
-    }
+    UPDATE_TITCSE (TREE_OPERAND (node, 0));
   else if (DECL_P (node))
     {
       if (staticp (node))
This page took 0.107687 seconds and 5 git commands to generate.