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

            Bug ID: 120936
           Summary: x86_function_profiler emits an unused label
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: liuhongt at gcc dot gnu.org
  Target Milestone: ---
            Target: x86-64

[hjl@gnu-tgl-3 tmp]$ cat t.c
void
foo (void)
{
}
[hjl@gnu-tgl-3 tmp]$ gcc -O2 -pg -S t.c
[hjl@gnu-tgl-3 tmp]$ cat t.s
        .file   "t.c"
        .text
        .p2align 4
        .globl  foo
        .type   foo, @function
foo:
.LFB0:
        .cfi_startproc
        pushq   %rbp
        .cfi_def_cfa_offset 16
        .cfi_offset 6, -16
        movq    %rsp, %rbp
        .cfi_def_cfa_register 6
1:      call    mcount
^^ Why is it here?
        popq    %rbp
        .cfi_def_cfa 7, 8
        ret
        .cfi_endproc
.LFE0:
        .size   foo, .-foo
        .ident  "GCC: (GNU) 15.1.1 20250521 (Red Hat 15.1.1-2)"
        .section        .note.GNU-stack,"",@progbits
[hjl@gnu-tgl-3 tmp]$ gcc -O2 -pg -S t.c -mfentry
[hjl@gnu-tgl-3 tmp]$ cat t.s
        .file   "t.c"
        .text
        .p2align 4
        .globl  foo
        .type   foo, @function
foo:
.LFB0:
        .cfi_startproc
1:      call    __fentry__
^^ Why is it here?
        ret
        .cfi_endproc
.LFE0:
        .size   foo, .-foo
        .ident  "GCC: (GNU) 15.1.1 20250521 (Red Hat 15.1.1-2)"
        .section        .note.GNU-stack,"",@progbits
[hjl@gnu-tgl-3 tmp]$

Reply via email to