gcov-tool: Fix merging of different endian coverage data [PR96267]

Message ID 9db44e87-2216-a107-d86a-4e7dde19b216@suse.cz
State New
Headers show
Series
  • gcov-tool: Fix merging of different endian coverage data [PR96267]
Related show

Commit Message

Martin Liška July 23, 2020, 1:03 p.m.
Hi.

There's one obvious patch that I'm going to commmit on behalf of Dong.

Martin

2020-07-21  Dong JianQiang  <dongjianqiang2@huawei.com>

gcc/ChangeLog:

	PR gcov-profile/96267
	* gcov-io.c (gcov_open): enable if IN_GCOV_TOOL.
---
  gcc/gcov-io.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.27.0

Comments

dongjianqiang (A) July 24, 2020, 8:59 a.m. | #1
Thanks Martin.

> -----Original Message-----

> From: Martin Liška [mailto:mliska@suse.cz]

> Sent: Thursday, July 23, 2020 9:03 PM

> To: gcc-patches@gcc.gnu.org

> Cc: dongjianqiang (A) <dongjianqiang2@huawei.com>

> Subject: [PATCH] gcov-tool: Fix merging of different endian coverage data

> [PR96267]

> 

> Hi.

> 

> There's one obvious patch that I'm going to commmit on behalf of Dong.

> 

> Martin

> 

> 2020-07-21  Dong JianQiang  <dongjianqiang2@huawei.com>

> 

> gcc/ChangeLog:

> 

> 	PR gcov-profile/96267

> 	* gcov-io.c (gcov_open): enable if IN_GCOV_TOOL.

> ---

>   gcc/gcov-io.c | 2 +-

>   1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/gcc/gcov-io.c b/gcc/gcov-io.c index ac60f9baf47..4db56f8aacf

> 100644

> --- a/gcc/gcov-io.c

> +++ b/gcc/gcov-io.c

> @@ -144,7 +144,7 @@ gcov_open (const char *name, int mode)

>     gcov_var.offset = gcov_var.length = 0;

>     gcov_var.overread = -1u;

>     gcov_var.error = 0;

> -#if !IN_LIBGCOV

> +#if !IN_LIBGCOV || defined (IN_GCOV_TOOL)

>     gcov_var.endian = 0;

>   #endif

>   #if GCOV_LOCKED

> --

> 2.27.0

Patch

diff --git a/gcc/gcov-io.c b/gcc/gcov-io.c
index ac60f9baf47..4db56f8aacf 100644
--- a/gcc/gcov-io.c
+++ b/gcc/gcov-io.c
@@ -144,7 +144,7 @@  gcov_open (const char *name, int mode)
    gcov_var.offset = gcov_var.length = 0;
    gcov_var.overread = -1u;
    gcov_var.error = 0;
-#if !IN_LIBGCOV
+#if !IN_LIBGCOV || defined (IN_GCOV_TOOL)
    gcov_var.endian = 0;
  #endif
  #if GCOV_LOCKED