[Bug gcov-profile/91971] Profile directory concatenated with object file path

qinzhao at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Oct 9 15:03:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91971

--- Comment #1 from qinzhao at gcc dot gnu.org ---
the following simple patch will fix this issue:

$ git diff coverage.c
diff --git a/gcc/coverage.c b/gcc/coverage.c
index 0d5138f..a80337e 100644
--- a/gcc/coverage.c
+++ b/gcc/coverage.c
@@ -1229,6 +1229,11 @@ coverage_init (const char *filename)
       else
        profile_data_prefix = getpwd ();
     }
+  else
+    {
+      filename = mangle_path (filename);
+      len = strlen (filename);
+    }

   if (profile_data_prefix)
     prefix_len = strlen (profile_data_prefix);


More information about the Gcc-bugs mailing list