cgraph.c (dump_cgraph_varpool_node): Don't crash if called before cgraph_function_fla...
authorRichard Henderson <rth@redhat.com>
Mon, 25 Sep 2006 17:50:25 +0000 (10:50 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 25 Sep 2006 17:50:25 +0000 (10:50 -0700)
        * cgraph.c (dump_cgraph_varpool_node): Don't crash if called
        before cgraph_function_flags_ready.

From-SVN: r117203

gcc/ChangeLog
gcc/cgraph.c

index 245b081ee9f76f57c3b70b592a595172e38b6ffd..49c51ced7a78993ef70176a932189ddd9af0681e 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 372b90d5eaa7dc55f6ced4dd3f396219557795a1..3e5dab1f94eb789bb23aa63f2b534fa2d5a6b13f 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)