Hi.
I'm partially reverting change that's not needed.
Survives regression tests on ppc64le-linux-gnu.
Martin
gcc/testsuite/ChangeLog:
2018-10-25 Martin Liska <[email protected]>
PR other/87735
* gcc.dg/tree-prof/time-profiler-1.c: Revert.
* gcc.dg/tree-prof/time-profiler-2.c: Likewise.
* gcc.dg/tree-prof/time-profiler-3.c: Likewise.
libgcc/ChangeLog:
2018-10-25 Martin Liska <[email protected]>
PR other/87735
* libgcov-profiler.c: Revert.
---
gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c | 2 +-
gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c | 4 ++--
gcc/testsuite/gcc.dg/tree-prof/time-profiler-3.c | 2 +-
libgcc/libgcov-profiler.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c b/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c
index a622df23ce6..455f923f3f4 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c
@@ -16,6 +16,6 @@ int main ()
{
return foo ();
}
+/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 0" 1 "profile"} } */
/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 1" 1 "profile"} } */
/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 2" 1 "profile"} } */
-/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 3" 1 "profile"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c b/gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c
index 497b585388e..e6eaeb99810 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c
@@ -43,7 +43,7 @@ int main ()
return r;
}
-/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 1" 2 "profile"} } */
+/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 0" 2 "profile"} } */
+/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 1" 1 "profile"} } */
/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 2" 1 "profile"} } */
/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 3" 1 "profile"} } */
-/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 4" 1 "profile"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-prof/time-profiler-3.c b/gcc/testsuite/gcc.dg/tree-prof/time-profiler-3.c
index 69daf237483..69ce0260828 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/time-profiler-3.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/time-profiler-3.c
@@ -17,6 +17,6 @@ int main ()
{
return foo ();
}
+/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 0" 1 "profile"} } */
/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 1" 1 "profile"} } */
/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 2" 1 "profile"} } */
-/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 3" 1 "profile"} } */
diff --git a/libgcc/libgcov-profiler.c b/libgcc/libgcov-profiler.c
index 47c00ee4b4a..7a5e50009ce 100644
--- a/libgcc/libgcov-profiler.c
+++ b/libgcc/libgcov-profiler.c
@@ -335,7 +335,7 @@ __gcov_indirect_call_profiler_v2 (gcov_type value, void* cur_func)
#ifdef L_gcov_time_profiler
/* Counter for first visit of each function. */
-gcov_type __gcov_time_profiler_counter ATTRIBUTE_HIDDEN = 1;
+gcov_type __gcov_time_profiler_counter ATTRIBUTE_HIDDEN;
#endif