From: "Martin Liška" <mliska@suse.cz>
To: Sebastian Huber <sebastian.huber@embedded-brains.de>,
gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] gcov: Fix first time gcov info dump
Date: Mon, 2 May 2022 10:50:08 +0200 [thread overview]
Message-ID: <a029fdc9-340c-2317-5c8c-4cc6020df727@suse.cz> (raw)
In-Reply-To: <20220502084319.69190-1-sebastian.huber@embedded-brains.de>
On 5/2/22 10:43, Sebastian Huber wrote:
> This patch fixes an issue introduced by commit
> ef9a53feae5701953da9161afef2aea0329ec8b2:
Works for me, please install it.
Martin
>
> gcc --coverage main.c && ./a.out
> libgcov profiling error:a-main.gcda:Error writing
>
> gcc/ChangeLog:
>
> * gcov-io.cc (gcov_rewrite): Clear the file error status.
> ---
> gcc/gcov-io.cc | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/gcov-io.cc b/gcc/gcov-io.cc
> index fdf745e6ce1..62032ccfa18 100644
> --- a/gcc/gcov-io.cc
> +++ b/gcc/gcov-io.cc
> @@ -79,11 +79,14 @@ gcov_is_error (void)
> }
>
> #if IN_LIBGCOV
> -/* Move to beginning of file and initialize for writing. */
> +/* Move to beginning of file, initialize for writing, and clear file error
> + status. */
> +
> GCOV_LINKAGE inline void
> gcov_rewrite (void)
> {
> gcov_var.mode = -1;
> + gcov_var.error = GCOV_FILE_NO_ERROR;
> fseek (gcov_var.file, 0L, SEEK_SET);
> }
> #endif
prev parent reply other threads:[~2022-05-02 8:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-02 8:43 Sebastian Huber
2022-05-02 8:50 ` Martin Liška [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a029fdc9-340c-2317-5c8c-4cc6020df727@suse.cz \
--to=mliska@suse.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=sebastian.huber@embedded-brains.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).