From: aoliva Date: Mon, 18 Apr 2005 17:04:06 +0000 (+0000) Subject: * tree-cfg.c (dump_function_to_file): Do not crash if cfun or X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a6e7751945510ffea5aa172fd5fbc563264f1181;p=thirdparty%2Fgcc.git * tree-cfg.c (dump_function_to_file): Do not crash if cfun or cfun->cfg are NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98331 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 585dc72eb733..f07ba4d25862 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-04-18 Alexandre Oliva + + * tree-cfg.c (dump_function_to_file): Do not crash if cfun or + cfun->cfg are NULL. + 2005-04-18 Tom Tromey * cgraphunit.c (cgraph_finalize_compilation_unit): Fix a comment diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 6bed701e5da6..cfdf14c1ca1c 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -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);