summaryrefslogtreecommitdiff
path: root/gcc/coverage.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-12-05 10:08:44 +0100
committerMartin Liska <marxin@gcc.gnu.org>2019-12-05 09:08:44 +0000
commit42870a86829f9d6dd326d318a3a028fbceb88d94 (patch)
treeb7c30bcf4c9e0345b8c9dcc6e25d142c9f0b693f /gcc/coverage.c
parentca45475532cfba964304eb54ea7df4311469f6c2 (diff)
Fix profile name files without -fprofile-dir.
2019-12-05 Martin Liska <mliska@suse.cz> PR gcov-profile/91971 * coverage.c (coverage_init): Mangle full path only when -fprofile-dir is used. From-SVN: r278990
Diffstat (limited to 'gcc/coverage.c')
-rw-r--r--gcc/coverage.c2
1 files changed, 1 insertions, 1 deletions
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