tree-cfg.c (dump_function_to_file): Do not crash if cfun or cfun->cfg are NULL.

* tree-cfg.c (dump_function_to_file): Do not crash if cfun or
cfun->cfg are NULL.

From-SVN: r98331
This commit is contained in:
Alexandre Oliva 2005-04-18 17:04:06 +00:00 committed by Alexandre Oliva
parent 9d2038719f
commit ab54a8fcec
2 changed files with 6 additions and 1 deletions

View 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

View 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);