aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-profile.c')
-rw-r--r--gcc/tree-profile.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 6ab06e6..31d305b 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -578,6 +578,13 @@ tree_profiling (void)
if (DECL_SOURCE_LOCATION (node->decl) == BUILTINS_LOCATION)
continue;
+ /* Do not instrument extern inline functions when testing coverage.
+ While this is not perfectly consistent (early inlined extern inlines
+ will get acocunted), testsuite expects that. */
+ if (DECL_EXTERNAL (node->decl)
+ && flag_test_coverage)
+ continue;
+
push_cfun (DECL_STRUCT_FUNCTION (node->decl));
/* Local pure-const may imply need to fixup the cfg. */