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);