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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |wrong-debug
   Last reconfirmed|                            |2021-06-09
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
 <2><85>: Abbrev Number: 6 (DW_TAG_variable)
    <86>   DW_AT_name        : f
    <88>   DW_AT_decl_file   : 1
    <89>   DW_AT_decl_line   : 8
    <8a>   DW_AT_decl_column : 12
    <8b>   DW_AT_type        : <0x2d>
    <8f>   DW_AT_location    : 2 byte block: 91 64      (DW_OP_fbreg: -28)

but

(gdb) disassemble
Dump of assembler code for function main:
   0x0000000000400497 <+0>:     sub    $0x18,%rsp
   0x000000000040049b <+4>:     movl   $0x7,0x4(%rsp)
   0x00000000004004a3 <+12>:    movl   $0x8,0x8(%rsp)
=> 0x00000000004004ab <+20>:    mov    0x4(%rsp),%rdi
   0x00000000004004b0 <+25>:    mov    $0x9,%esi
   0x00000000004004b5 <+30>:    call   0x400496 <not_opt>

you see the var on the frame has not been fully initialized but instead
the full variable is in the call argument registers %rdi and %esi only.

Reply via email to