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

            Bug ID: 108146
           Summary: gcc -pg does not produce gmon.out
           Product: gcc
           Version: 12.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Sid.Touati at inria dot fr
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 54112
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54112&action=edit
source code (C and h files) + makefile. Just type make, then run a.out.

Hi,
please find enclosed my archive that contains my source files and make.
Juste type make to generate a.out, then execute a.out to see the problem.

The problem is that the file gmon.out is not generated. I checked the assembly
generated by gcc, gmon functions are inserted correctly. When I debug the
binary code, it seems that gmon functions are not called... This is a nightmare
to understand why :)

I checked that this problem does not happen with many other C applications. I
do not understand why it happens here. I checked this "bug" on two distinct
machines. 

Here is my current configuration: 
touati@:~/tmp/mypb> uname -a
Linux  6.0.12-300.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 8 16:58:47 UTC
2022 x86_64 x86_64 x86_64 GNU/Linux

It is a fedora 37 workstation.

Maybe it is a bug in "gcc -pg". 

Regards
S.T.

Reply via email to