[Bug debug/98656] [9/10/11 Regression] switchlower_O0 drops line number of switch

vries at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 13 10:53:17 GMT 2021


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

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 49959
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49959&action=edit
Tentative patch

Using this tentative patch, I get back the .loc for line number 5:
...
foo:
.LFB0:
        .file 1 "small.c"
        .loc 1 4 1
        .cfi_startproc
        pushq   %rbp
        .cfi_def_cfa_offset 16
        .cfi_offset 6, -16
        movq    %rsp, %rbp
        .cfi_def_cfa_register 6
        movl    %edi, -20(%rbp)
        movl    %esi, -24(%rbp)
        .loc 1 5 3
        cmpl    $4, -20(%rbp)
        ja      .L13
...


More information about the Gcc-bugs mailing list