This is the mail archive of the 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]

[trunk<-vta] Re: [vta] skip .gcno generation during -fcompare-debug-second

On Dec  5, 2008, Alexandre Oliva <> wrote:

> The only difference between the .gcno file generated for the first and
> the second compilations is the timestamp.  The first is supposed to
> prevail, but if we overwrite the .gcno file during
> -fcompare-debug-second, it won't appear to match the object file
> produced by the first.  Oops.

> This patch fixes this problem by avoiding the generation of the .gcno
> file during the second -fcompare-debug compilation.  I'm installing it
> in the VTA branch.

Ok for trunk?

for  gcc/ChangeLog
from  Alexandre Oliva  <>

	* coverage.c (coverage_begin_output): Don't overwrite .gcno file
	during -fcompare-debug-second compilation.

Index: gcc/coverage.c
--- gcc/coverage.c.orig	2008-10-10 09:31:06.000000000 -0300
+++ gcc/coverage.c	2008-12-02 03:42:38.000000000 -0200
@@ -552,7 +552,7 @@ coverage_begin_output (void)
   /* We don't need to output .gcno file unless we're under -ftest-coverage
      (e.g. -fprofile-arcs/generate/use don't need .gcno to work). */
-  if (no_coverage || !flag_test_coverage)
+  if (no_coverage || !flag_test_coverage || flag_compare_debug)
     return 0;
   if (!bbg_function_announced)

Alexandre Oliva, freedom fighter
You must be the change you wish to see in the world. -- Gandhi
Be Free! --   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer

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