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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
What is done on other arches?  I mean the situation is basically the same on
x86_64,
where the artificial return value pointer argument is spilled early, then
clobbered
on calls and again b debug info is correct after the spill:
        pushq   %rbp
        movq    %rsp, %rbp
        subq    $16, %rsp
        movq    %rdi, -8(%rbp)
        movl    %esi, -12(%rbp)
        movl    %edx, -16(%rbp)
        movq    -8(%rbp), %rax
        movq    %rax, %rdi
        call    _ZN1BC1Ev
        movl    -12(%rbp), %edx
        movl    -16(%rbp), %eax
        addl    %eax, %edx
        movq    -8(%rbp), %rax
        movl    %edx, (%rax)
        nop
        movq    -8(%rbp), %rax
        leave
        ret
...
        .byte   0x1     # uleb128 0x1; (DIE (0xcc) DW_TAG_variable)
        .ascii "b\0"    # DW_AT_name
                        # DW_AT_decl_file (1, pr108996.C)
        .byte   0x1f    # DW_AT_decl_line
        .byte   0x8     # DW_AT_decl_column
        .long   0x2a    # DW_AT_type
        .byte   0x2     # uleb128 0x2; DW_AT_location
        .byte   0x91    # DW_OP_fbreg
        .byte   0x64    # sleb128 -28

Reply via email to