* tree-cfg.c (dump_function_to_file): Do not crash if cfun or
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Apr 2005 17:04:06 +0000 (17:04 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Apr 2005 17:04:06 +0000 (17:04 +0000)
cfun->cfg are NULL.

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

gcc/ChangeLog
gcc/tree-cfg.c

index 585dc72..f07ba4d 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-18  Alexandre Oliva  <aoliva@redhat.com>
+
+       * tree-cfg.c (dump_function_to_file): Do not crash if cfun or
+       cfun->cfg are NULL.
+
 2005-04-18  Tom Tromey  <tromey@redhat.com>
 
        * cgraphunit.c (cgraph_finalize_compilation_unit): Fix a comment
index 6bed701..cfdf14c 100644 (file)
@@ -5183,7 +5183,7 @@ dump_function_to_file (tree fn, FILE *file, int flags)
        }
     }
 
-  if (basic_block_info)
+  if (cfun && cfun->cfg && basic_block_info)
     {
       /* Make a CFG based dump.  */
       check_bb_profile (ENTRY_BLOCK_PTR, file);