OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-loop-ivcanon.c
index b0d45bc..187f53c 100644 (file)
@@ -162,12 +162,8 @@ constant_after_peeling (tree op, gimple stmt, struct loop *loop)
       /* First make fast look if we see constant array inside.  */
       while (handled_component_p (base))
        base = TREE_OPERAND (base, 0);
-      if ((DECL_P (base)
-          && TREE_STATIC (base)
-          && TREE_READONLY (base)
-           && (DECL_INITIAL (base)
-              || (!DECL_EXTERNAL (base)
-                  && targetm.binds_local_p (base))))
+      if ((DECL_P (base) == VAR_DECL
+          && const_value_known_p (base))
          || CONSTANT_CLASS_P (base))
        {
          /* If so, see if we understand all the indices.  */