OSDN Git Service

2005-10-16 Erik Edelmann <erik.edelmann@iki.fi>
[pf3gnuchains/gcc-fork.git] / gcc / tree-dfa.c
index beb83fb..9fc48d5 100644 (file)
@@ -314,13 +314,13 @@ dump_variable (FILE *file, tree var)
   fprintf (file, ", ");
   print_generic_expr (file, TREE_TYPE (var), dump_flags);
 
-  if (ann->type_mem_tag)
+  if (ann && ann->type_mem_tag)
     {
       fprintf (file, ", type memory tag: ");
       print_generic_expr (file, ann->type_mem_tag, dump_flags);
     }
 
-  if (ann->is_alias_tag)
+  if (ann && ann->is_alias_tag)
     fprintf (file, ", is an alias tag");
 
   if (TREE_ADDRESSABLE (var))
@@ -341,7 +341,7 @@ dump_variable (FILE *file, tree var)
       print_generic_expr (file, default_def (var), dump_flags);
     }
 
-  if (ann->may_aliases)
+  if (may_aliases (var))
     {
       fprintf (file, ", may aliases: ");
       dump_may_aliases_for (file, var);
@@ -463,7 +463,7 @@ debug_dfa_stats (void)
 }
 
 
-/* Collect DFA statistics and store them in the structure pointed by
+/* Collect DFA statistics and store them in the structure pointed to by
    DFA_STATS_P.  */
 
 static void
@@ -651,9 +651,9 @@ add_referenced_var (tree var, struct walk_state *walk_state)
             optimizers.  */
           && !DECL_EXTERNAL (var)
          /* It's not necessary to walk the initial value of non-constant
-            public variables because it cannot be propagated by the
+            variables because it cannot be propagated by the
             optimizers.  */
-         && (!TREE_PUBLIC (var) || !TREE_CONSTANT (var)))
+         && (TREE_CONSTANT (var) || TREE_READONLY (var)))
        walk_tree (&DECL_INITIAL (var), find_vars_r, walk_state, 0);
     }
 }