OSDN Git Service

* cgraph.c (dump_cgraph_varpool_node): Don't crash if called
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 25 Sep 2006 17:50:25 +0000 (17:50 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 25 Sep 2006 17:50:25 +0000 (17:50 +0000)
        before cgraph_function_flags_ready.

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

gcc/ChangeLog
gcc/cgraph.c

index 245b081..49c51ce 100644 (file)
@@ -1,3 +1,8 @@
+2006-09-25  Richard Henderson  <rth@redhat.com>
+
+       * cgraph.c (dump_cgraph_varpool_node): Don't crash if called
+       before cgraph_function_flags_ready.
+
 2006-09-24  Zdenek Dvorak <dvorakz@suse.cz>
            Adam Nemet  <anemet@caviumnetworks.com>
 
index 372b90d..3e5dab1 100644 (file)
@@ -786,7 +786,10 @@ void
 dump_cgraph_varpool_node (FILE *f, struct cgraph_varpool_node *node)
 {
   fprintf (f, "%s:", cgraph_varpool_node_name (node));
-  fprintf (f, " availability:%s", availability_names [cgraph_variable_initializer_availability (node)]);
+  fprintf (f, " availability:%s",
+          cgraph_function_flags_ready
+          ? availability_names[cgraph_variable_initializer_availability (node)]
+          : "not-ready");
   if (DECL_INITIAL (node->decl))
     fprintf (f, " initialized");
   if (node->needed)