tree-cfg.c (dump_function_to_file): Use cfun info only if it refers to the function...
authorAlexandre Oliva <aoliva@redhat.com>
Tue, 19 Apr 2005 04:34:10 +0000 (04:34 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Tue, 19 Apr 2005 04:34:10 +0000 (04:34 +0000)
* tree-cfg.c (dump_function_to_file): Use cfun info only if it
refers to the function being dumped.

From-SVN: r98367

gcc/ChangeLog
gcc/tree-cfg.c

index 3dc660e309d09b89e7aa6b5b4d1cb4f5a7b68d0b..a716177c5751e0cd4e17ed1dd21a712496309405 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-19  Alexandre Oliva  <aoliva@redhat.com>
+
+       * tree-cfg.c (dump_function_to_file): Use cfun info only if it
+       refers to the function being dumped.
+
 2005-04-18  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * varasm.c (assemble_start_function): Remove reset of in_section.
index cfdf14c1ca1cc4b11c8dd01b563531c83a49fde1..28af511d175f6c7588a791705e29d5b4c1babb2b 100644 (file)
@@ -5167,7 +5167,7 @@ dump_function_to_file (tree fn, FILE *file, int flags)
 
   /* When GIMPLE is lowered, the variables are no longer available in
      BIND_EXPRs, so display them separately.  */
-  if (cfun && cfun->unexpanded_var_list)
+  if (cfun && cfun->decl == fn && cfun->unexpanded_var_list)
     {
       ignore_topmost_bind = true;
 
@@ -5183,7 +5183,7 @@ dump_function_to_file (tree fn, FILE *file, int flags)
        }
     }
 
-  if (cfun && cfun->cfg && basic_block_info)
+  if (cfun && cfun->decl == fn && cfun->cfg && basic_block_info)
     {
       /* Make a CFG based dump.  */
       check_bb_profile (ENTRY_BLOCK_PTR, file);