diff options
author | Martin Liska <mliska@suse.cz> | 2016-07-22 12:19:57 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2016-07-22 10:19:57 +0000 |
commit | bc91c4361527fb229ad47f20a45de0b3160f2de9 (patch) | |
tree | 7d61a4e799f8e9fba5938c4b59cb017add066d75 /gcc/coverage.c | |
parent | 9fe9a3a780c9cd8f5fa45e162640b7169c27fe8f (diff) | |
download | gcc-bc91c4361527fb229ad47f20a45de0b3160f2de9.zip gcc-bc91c4361527fb229ad47f20a45de0b3160f2de9.tar.gz gcc-bc91c4361527fb229ad47f20a45de0b3160f2de9.tar.bz2 |
Consider functions with xloc.file == NULL (PR
PR gcov-profile/69028
PR gcov-profile/62047
* g++.dg/cilk-plus/pr69028.C: New test.
PR gcov-profile/69028
PR gcov-profile/62047
* cilk.c (create_cilk_helper_decl): Set location of a new decl
to the current_function_decl.
PR gcov-profile/69028
PR gcov-profile/62047
* coverage.c (coverage_compute_lineno_checksum): Do not
calculate checksum for fns w/o xloc.file.
(coverage_compute_profile_id): Likewise.
From-SVN: r238637
Diffstat (limited to 'gcc/coverage.c')
-rw-r--r-- | gcc/coverage.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/coverage.c b/gcc/coverage.c index 67cc908..d4d371e 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -553,7 +553,8 @@ coverage_compute_lineno_checksum (void) = expand_location (DECL_SOURCE_LOCATION (current_function_decl)); unsigned chksum = xloc.line; - chksum = coverage_checksum_string (chksum, xloc.file); + if (xloc.file) + chksum = coverage_checksum_string (chksum, xloc.file); chksum = coverage_checksum_string (chksum, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl))); @@ -580,7 +581,8 @@ coverage_compute_profile_id (struct cgraph_node *n) bool use_name_only = (PARAM_VALUE (PARAM_PROFILE_FUNC_INTERNAL_ID) == 0); chksum = (use_name_only ? 0 : xloc.line); - chksum = coverage_checksum_string (chksum, xloc.file); + if (xloc.file) + chksum = coverage_checksum_string (chksum, xloc.file); chksum = coverage_checksum_string (chksum, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (n->decl))); if (!use_name_only && first_global_object_name) |