From: Martin Liska Date: Thu, 5 Dec 2019 09:08:44 +0000 (+0100) Subject: Fix profile name files without -fprofile-dir. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=42870a86829f9d6dd326d318a3a028fbceb88d94;p=gcc.git Fix profile name files without -fprofile-dir. 2019-12-05 Martin Liska PR gcov-profile/91971 * coverage.c (coverage_init): Mangle full path only when -fprofile-dir is used. From-SVN: r278990 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9bb76236d24..b736bb291d4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-12-05 Martin Liska + + PR gcov-profile/91971 + * coverage.c (coverage_init): Mangle full path + only when -fprofile-dir is used. + 2019-12-05 Jakub Jelinek PR target/92791 diff --git a/gcc/coverage.c b/gcc/coverage.c index b8b20ddc8e3..2cdbb0172c9 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -1228,7 +1228,7 @@ coverage_init (const char *filename) else profile_data_prefix = getpwd (); } - else + else if (profile_data_prefix != NULL) { /* when filename is a absolute path, we also need to mangle the full path of filename to prevent the profiling data being stored into a