Fix target clones (PR gcov-profile/85370).
authorMartin Liska <mliska@suse.cz>
Tue, 31 Jul 2018 10:34:02 +0000 (12:34 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 31 Jul 2018 10:34:02 +0000 (10:34 +0000)
2018-07-31  Martin Liska  <mliska@suse.cz>

        PR gcov-profile/85370
* coverage.c (coverage_begin_function): Do not mark target
        clones as artificial functions.

From-SVN: r263112

gcc/ChangeLog
gcc/coverage.c

index 97bc2fd6e5154e351a7c3966f03e2654f1827606..b55f7a3f19bcda707735bfe6627aaf337b7d6972 100644 (file)
@@ -1,3 +1,9 @@
+2018-07-31  Martin Liska  <mliska@suse.cz>
+
+        PR gcov-profile/85370
+       * coverage.c (coverage_begin_function): Do not mark target
+        clones as artificial functions.
+
 2018-07-31  Martin Liska  <mliska@suse.cz>
 
         PR gcov-profile/83813
index da171c84d3ca3886372558e2116b6e25cf45abf0..bae6f5cafac6d7ce9b9a250bcb1e70b10fd1f628 100644 (file)
@@ -656,7 +656,8 @@ coverage_begin_function (unsigned lineno_checksum, unsigned cfg_checksum)
   gcov_write_unsigned (cfg_checksum);
   gcov_write_string (IDENTIFIER_POINTER
                     (DECL_ASSEMBLER_NAME (current_function_decl)));
-  gcov_write_unsigned (DECL_ARTIFICIAL (current_function_decl));
+  gcov_write_unsigned (DECL_ARTIFICIAL (current_function_decl)
+                      && !DECL_FUNCTION_VERSIONED (current_function_decl));
   gcov_write_filename (xloc.file);
   gcov_write_unsigned (xloc.line);
   gcov_write_unsigned (xloc.column);