aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2005-04-18 17:04:06 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2005-04-18 17:04:06 +0000
commitab54a8fcecba00d08ef24abe4d8602104afeeecb (patch)
tree29cb36ec9d6430581897693c0863dce6eba74bb1 /gcc/tree-cfg.c
parent9d2038719fda35662abea0f6ebe210adf46c9df4 (diff)
downloadgcc-ab54a8fcecba00d08ef24abe4d8602104afeeecb.zip
gcc-ab54a8fcecba00d08ef24abe4d8602104afeeecb.tar.gz
gcc-ab54a8fcecba00d08ef24abe4d8602104afeeecb.tar.bz2
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
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 6bed701..cfdf14c 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);