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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The assembly of main is:
main:
.LFB1:
        # pr104549.c:9:1
        .loc 1 9 1
        .cfi_startproc
# BLOCK 2, count:1073741824 (estimated locally) seq:0
# PRED: ENTRY [always]  count:1073741824 (estimated locally) (FALLTHRU)
        # pr104549.c:10:5
        .loc 1 10 5
.LBB4:
.LBB5:
        # pr104549.c:3:5
        .loc 1 3 5
.LVL2:
        # DEBUG i => 0
        # pr104549.c:4:5
        .loc 1 4 5
        # pr104549.c:4:19
        .loc 1 4 19
        # pr104549.c:4:12
        .loc 1 4 12
        # pr104549.c:5:5
        .loc 1 5 5
.LBE5:
.LBE4:
        # pr104549.c:9:1
        .loc 1 9 1 is_stmt 0
        subq    $8, %rsp
        .cfi_def_cfa_offset 16
.LBB7:
.LBB6:
        # pr104549.c:5:5
        .loc 1 5 5
        xorl    %edi, %edi
        xorl    %eax, %eax
        call    test
.LVL3:
.LBE6:
.LBE7:
        # pr104549.c:11:1
        .loc 1 11 1
        xorl    %eax, %eax
        addq    $8, %rsp
        .cfi_def_cfa_offset 8
# SUCC: EXIT [always]  count:1073741824 (estimated locally)
        ret
with -O2 -g -dA, the inlined a is in the .LBB4...LBE4 and .LBB7...LBE7 ranges
but the first range is empty (no insns in it), the
very first insn in main doesn't belong to the inline function and .loc for it
is line 9, perhaps the debugger chooses some other one because of the is_stmt
0?
With -gno-statement-frontiers the debugger reports main's { as the first
location.

Reply via email to