public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/114735] New: Gcov not working with gcc version 11.4.0
@ 2024-04-16  6:36 gejoed at rediffmail dot com
  2024-04-16  6:41 ` [Bug gcov-profile/114735] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: gejoed at rediffmail dot com @ 2024-04-16  6:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114735

            Bug ID: 114735
           Summary: Gcov not working with gcc version 11.4.0
           Product: gcc
           Version: 11.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gejoed at rediffmail dot com
  Target Milestone: ---

Created attachment 57955
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57955&action=edit
Gcov runs on a sample program

When I try to run a sample program with gcov of version 11.4.0 it fails as
shown in the attached file. The same program runs fine with the default gcc
version of 8.5. I download and installed gcc version 11.4.0 yesterday locally
in my system.

Snippet from the attached file:
$ls
a.out  a-sample-prog.gcda  a-sample-prog.gcno  sample-prog.c
$
$
$/workspace/tools/GCC/gcc-11.4.0-bld/bin/gcov sample-prog.c 
sample-prog.gcno:cannot open notes file
sample-prog.gcda:cannot open data file, assuming not executed
No executable lines

---------------------------------------------------------

I could see the gcno and gcda files having prefix of 'a-' and probably the
reason of the gcov failure(?). However this was not seen with version 8.5 of
gcc.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/114735] Gcov not working with gcc version 11.4.0
  2024-04-16  6:36 [Bug gcov-profile/114735] New: Gcov not working with gcc version 11.4.0 gejoed at rediffmail dot com
@ 2024-04-16  6:41 ` pinskia at gcc dot gnu.org
  2024-04-16 11:49 ` gejoed at rediffmail dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-16  6:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114735

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This was on purpose. See pr 95365 which this is a dup of. Basically the example
has been improved for how to use gcov now.

*** This bug has been marked as a duplicate of bug 95365 ***

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/114735] Gcov not working with gcc version 11.4.0
  2024-04-16  6:36 [Bug gcov-profile/114735] New: Gcov not working with gcc version 11.4.0 gejoed at rediffmail dot com
  2024-04-16  6:41 ` [Bug gcov-profile/114735] " pinskia at gcc dot gnu.org
@ 2024-04-16 11:49 ` gejoed at rediffmail dot com
  2024-04-16 12:36 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: gejoed at rediffmail dot com @ 2024-04-16 11:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114735

--- Comment #2 from Gejoe <gejoed at rediffmail dot com> ---
May I know where the fix has gone to , meaning the gcc version which will not
have this issue of gcov failure ?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/114735] Gcov not working with gcc version 11.4.0
  2024-04-16  6:36 [Bug gcov-profile/114735] New: Gcov not working with gcc version 11.4.0 gejoed at rediffmail dot com
  2024-04-16  6:41 ` [Bug gcov-profile/114735] " pinskia at gcc dot gnu.org
  2024-04-16 11:49 ` gejoed at rediffmail dot com
@ 2024-04-16 12:36 ` pinskia at gcc dot gnu.org
  2024-04-17  5:04 ` gejoed at rediffmail dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-16 12:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114735

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The "fix" was to how to build to be able to use gcov. Basically you build to an
object file first and then link the object file to get the old behavior and the
behavior that gcov expects.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/114735] Gcov not working with gcc version 11.4.0
  2024-04-16  6:36 [Bug gcov-profile/114735] New: Gcov not working with gcc version 11.4.0 gejoed at rediffmail dot com
                   ` (2 preceding siblings ...)
  2024-04-16 12:36 ` pinskia at gcc dot gnu.org
@ 2024-04-17  5:04 ` gejoed at rediffmail dot com
  2024-04-17  5:06 ` gejoed at rediffmail dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: gejoed at rediffmail dot com @ 2024-04-17  5:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114735

--- Comment #4 from Gejoe <gejoed at rediffmail dot com> ---
Thanks Andrew for the info.

So, does this mean that every program which was compiled earlier with one step
(ie. gcc --coverage srcfile.c)  of gcc/g++ will have to be split to 2 steps
using -c option first and then processing the '.o' file ? Is this change
documented in the GCC gcov manual well ?
https://gcc.gnu.org/onlinedocs/gcc/Invoking-Gcov.html

I just happened to see that example today in the "Invoking Gcov" section and
was thinking if this has to be done going forward for all recent gcc versions
(post 11.0) or is just confined to version 11.x gcc.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/114735] Gcov not working with gcc version 11.4.0
  2024-04-16  6:36 [Bug gcov-profile/114735] New: Gcov not working with gcc version 11.4.0 gejoed at rediffmail dot com
                   ` (3 preceding siblings ...)
  2024-04-17  5:04 ` gejoed at rediffmail dot com
@ 2024-04-17  5:06 ` gejoed at rediffmail dot com
  2024-04-17  5:06 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: gejoed at rediffmail dot com @ 2024-04-17  5:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114735

--- Comment #5 from Gejoe <gejoed at rediffmail dot com> ---
my previous message is after seeing this change :
https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=gcc/doc/gcov.texi;h=22e42da2ea66db568e6c563c4f2e619fe2c9ae92;hp=61250c9407e1d0e49a693d0fcc4e4c38d0e6afff;hb=452283bd060eb9bae41199b4b5e7266155d40e12;hpb=862b9b225fba6cf3c63234206f2dbc47f1ab5350

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/114735] Gcov not working with gcc version 11.4.0
  2024-04-16  6:36 [Bug gcov-profile/114735] New: Gcov not working with gcc version 11.4.0 gejoed at rediffmail dot com
                   ` (4 preceding siblings ...)
  2024-04-17  5:06 ` gejoed at rediffmail dot com
@ 2024-04-17  5:06 ` pinskia at gcc dot gnu.org
  2024-04-19  4:21 ` gejoed at rediffmail dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-17  5:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114735

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Gejoe from comment #4)
> Thanks Andrew for the info.
> 
> So, does this mean that every program which was compiled earlier with one
> step (ie. gcc --coverage srcfile.c)  of gcc/g++ will have to be split to 2
> steps using -c option first and then processing the '.o' file ? Is this
> change documented in the GCC gcov manual well ?
> https://gcc.gnu.org/onlinedocs/gcc/Invoking-Gcov.html
> 
> I just happened to see that example today in the "Invoking Gcov" section and
> was thinking if this has to be done going forward for all recent gcc
> versions (post 11.0) or is just confined to version 11.x gcc.

No it was changed for all versions post GCC 11+ (including GCC 11).

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/114735] Gcov not working with gcc version 11.4.0
  2024-04-16  6:36 [Bug gcov-profile/114735] New: Gcov not working with gcc version 11.4.0 gejoed at rediffmail dot com
                   ` (5 preceding siblings ...)
  2024-04-17  5:06 ` pinskia at gcc dot gnu.org
@ 2024-04-19  4:21 ` gejoed at rediffmail dot com
  2024-04-19  4:25 ` pinskia at gcc dot gnu.org
  2024-04-19  5:17 ` gejoed at rediffmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: gejoed at rediffmail dot com @ 2024-04-19  4:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114735

--- Comment #7 from Gejoe <gejoed at rediffmail dot com> ---
Thanks Andrew. 

It would be better to document this change post gcc11 apart from a sample
example as generally it is understood that --coverage flag is enough for gcc to
get coverage enabled build done and then gcov run post execution. This split of
the job now into 2 is not very much evident (as it is only mentioned in the
example and people like me will assume that was there earlier as well and won't
notice the change)and hence the suggestion.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/114735] Gcov not working with gcc version 11.4.0
  2024-04-16  6:36 [Bug gcov-profile/114735] New: Gcov not working with gcc version 11.4.0 gejoed at rediffmail dot com
                   ` (6 preceding siblings ...)
  2024-04-19  4:21 ` gejoed at rediffmail dot com
@ 2024-04-19  4:25 ` pinskia at gcc dot gnu.org
  2024-04-19  5:17 ` gejoed at rediffmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-19  4:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114735

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I will try to add something to https://gcc.gnu.org/gcc-11/porting_to.html in
the next few weeks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/114735] Gcov not working with gcc version 11.4.0
  2024-04-16  6:36 [Bug gcov-profile/114735] New: Gcov not working with gcc version 11.4.0 gejoed at rediffmail dot com
                   ` (7 preceding siblings ...)
  2024-04-19  4:25 ` pinskia at gcc dot gnu.org
@ 2024-04-19  5:17 ` gejoed at rediffmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: gejoed at rediffmail dot com @ 2024-04-19  5:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114735

--- Comment #9 from Gejoe <gejoed at rediffmail dot com> ---
Thank you Andrew.

Meanwhile any idea if the support person is on leave for this query :
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114751&nbsp;

Thanks again.

-Gejoe


From: &quot;pinskia at gcc dot gnu.org&quot; &lt;gcc-bugzilla@gcc.gnu.org&gt;
Sent: Fri, 19 Apr 2024 09:55:38
To: gejoed@rediffmail.com
Subject: [Bug gcov-profile/114735] Gcov not working with gcc version 11.4.0

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114735

--- Comment #8 from Andrew Pinski &lt;pinskia at gcc dot gnu.org&gt; ---
I will try to add something to https://gcc.gnu.org/gcc-11/porting_to.html in
the next few weeks.

--
You are receiving this mail because:
You reported the bug.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-04-19  5:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-16  6:36 [Bug gcov-profile/114735] New: Gcov not working with gcc version 11.4.0 gejoed at rediffmail dot com
2024-04-16  6:41 ` [Bug gcov-profile/114735] " pinskia at gcc dot gnu.org
2024-04-16 11:49 ` gejoed at rediffmail dot com
2024-04-16 12:36 ` pinskia at gcc dot gnu.org
2024-04-17  5:04 ` gejoed at rediffmail dot com
2024-04-17  5:06 ` gejoed at rediffmail dot com
2024-04-17  5:06 ` pinskia at gcc dot gnu.org
2024-04-19  4:21 ` gejoed at rediffmail dot com
2024-04-19  4:25 ` pinskia at gcc dot gnu.org
2024-04-19  5:17 ` gejoed at rediffmail dot com

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).