This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix cgraph dumping bug


Fixed a place where the wrong dump file was being used, leading to
an inconsistency and seg fault when dump_file was non-NULL but
cgraph_dump_file was NULL.

Bootstrapped and tested on x86-64-unknown-linux-gnu. Ok for trunk?

Thanks,
Teresa

2014-05-09  Teresa Johnson  <tejohnson@google.com>

        * cgraphunit.c (analyze_functions): Use correct dump file.

Index: cgraphunit.c
===================================================================
--- cgraphunit.c        (revision 210157)
+++ cgraphunit.c        (working copy)
@@ -984,7 +984,7 @@ analyze_functions (void)
       first_analyzed_var = varpool_first_variable ();
       first_analyzed = cgraph_first_function ();

-      if (changed && dump_file)
+      if (changed && cgraph_dump_file)
        fprintf (cgraph_dump_file, "\n");

       /* Lower representation, build callgraph edges and references
for all trivially


-- 
Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]