From 459ffad3fd0486d686a14f45f59167b1e08c240a Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 19 Feb 2007 19:26:16 +0000 Subject: [PATCH] tree-cfg.c (dump_function_to_file): Be prepared for functions without DECL_STRUCT_FUNCTION initialized. * tree-cfg.c (dump_function_to_file): Be prepared for functions without DECL_STRUCT_FUNCTION initialized. From-SVN: r122135 --- gcc/ChangeLog | 5 +++++ gcc/tree-cfg.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0f834e47b0e..f5213144216 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-02-19 Eric Botcazou + + * tree-cfg.c (dump_function_to_file): Be prepared for functions + without DECL_STRUCT_FUNCTION initialized. + 2007-02-19 Eric Botcazou * gimplify.c (gimplify_init_ctor_preeval_1): Detect potential overlap diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index a99f3c7f5eb..593dc0d03c1 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -4998,6 +4998,7 @@ void dump_function_to_file (tree fn, FILE *file, int flags) { tree arg, vars, var; + struct function *dsf; bool ignore_topmost_bind = false, any_var = false; basic_block bb; tree chain; @@ -5015,8 +5016,10 @@ dump_function_to_file (tree fn, FILE *file, int flags) } fprintf (file, ")\n"); - if (flags & TDF_DETAILS) - dump_eh_tree (file, DECL_STRUCT_FUNCTION (fn)); + dsf = DECL_STRUCT_FUNCTION (fn); + if (dsf && (flags & TDF_DETAILS)) + dump_eh_tree (file, dsf); + if (flags & TDF_RAW) { dump_node (fn, TDF_SLIM | flags, file);