public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/29461] inconsistent variable output
       [not found] <bug-29461-4@http.gcc.gnu.org/bugzilla/>
@ 2024-01-26 14:35 ` rguenth at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-26 14:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
 <2><6c>: Abbrev Number: 8 (DW_TAG_formal_parameter)
    <6d>   DW_AT_name        : s_p
    <71>   DW_AT_decl_file   : 1
    <72>   DW_AT_decl_line   : 3
    <73>   DW_AT_decl_column : 19
    <74>   DW_AT_type        : <0x8a>
    <78>   DW_AT_location    : 2 byte block: 91 58      (DW_OP_fbreg: -40)
 <2><7b>: Abbrev Number: 9 (DW_TAG_variable)
    <7c>   DW_AT_name        : ss
    <7f>   DW_AT_decl_file   : 1
    <80>   DW_AT_decl_line   : 5
    <81>   DW_AT_decl_column : 20
    <82>   DW_AT_type        : <0x46>
    <86>   DW_AT_location    : 2 byte block: 91 68      (DW_OP_fbreg: -24)

so we can and do now make those equal.  With -O1 we have

 <2><6c>: Abbrev Number: 9 (DW_TAG_formal_parameter)
    <6d>   DW_AT_name        : s_p
    <71>   DW_AT_decl_file   : 1
    <72>   DW_AT_decl_line   : 3
    <73>   DW_AT_decl_column : 19
    <74>   DW_AT_type        : <0xc0>
    <78>   DW_AT_location    : 0x12 (location list)
    <7c>   DW_AT_GNU_locviews: 0xc
 <2><80>: Abbrev Number: 10 (DW_TAG_variable)
    <81>   DW_AT_name        : ss
    <84>   DW_AT_decl_file   : 1
    <85>   DW_AT_decl_line   : 5
    <86>   DW_AT_decl_column : 20
    <87>   DW_AT_type        : <0x46>
    <8b>   DW_AT_location    : 0x2b (location list)
    <8f>   DW_AT_GNU_locviews: 0x25

    00000012 v000000000000000 v000000000000000 views at 0000000c for:
             0000000000000000 0000000000000008 (DW_OP_reg5 (rdi))
    00000017 v000000000000000 v000000000000000 views at 0000000e for:
             0000000000000008 0000000000000012 (DW_OP_reg3 (rbx))
    0000001c v000000000000000 v000000000000000 views at 00000010 for:
             0000000000000012 0000000000000013 (DW_OP_entry_value: (DW_OP_reg5
(rdi)); DW_OP_stack_value)
    00000024 <End of list>

    0000002b v000000000000001 v000000000000000 views at 00000025 for:
             0000000000000004 0000000000000008 (DW_OP_reg5 (rdi))
    00000030 v000000000000000 v000000000000000 views at 00000027 for:
             0000000000000008 0000000000000012 (DW_OP_reg3 (rbx))
    00000035 v000000000000000 v000000000000000 views at 00000029 for:
             0000000000000012 0000000000000013 (DW_OP_entry_value: (DW_OP_reg5
(rdi)); DW_OP_stack_value)
    0000003d <End of list>

which is nearly equivalent and I suppose "correct" in that we're not
showing it live during the prologue before the declaration/assignment

func2:
.LVL0:
.LFB0:
        .file 1 "t.c"
        .loc 1 4 1 view -0
        .cfi_startproc
        .loc 1 4 1 is_stmt 0 view .LVU1
        pushq   %rbx
        .cfi_def_cfa_offset 16
        .cfi_offset 3, -16
        movq    %rdi, %rbx
        .loc 1 5 3 is_stmt 1 view .LVU2
.LVL1:
        .loc 1 6 3 view .LVU3
        call    func

-O0 vs -O is also -fno-var-tracking vs. -fvar-tracking of course.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug debug/29461] inconsistent variable output
  2006-10-13 17:42 [Bug debug/29461] New: " geoffk at gcc dot gnu dot org
@ 2006-10-13 17:44 ` geoffk at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2006-10-13 17:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from geoffk at gcc dot gnu dot org  2006-10-13 17:44 -------
Created an attachment (id=12426)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12426&action=view)
.s output of compiling the example


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29461


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-26 14:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-29461-4@http.gcc.gnu.org/bugzilla/>
2024-01-26 14:35 ` [Bug debug/29461] inconsistent variable output rguenth at gcc dot gnu.org
2006-10-13 17:42 [Bug debug/29461] New: " geoffk at gcc dot gnu dot org
2006-10-13 17:44 ` [Bug debug/29461] " geoffk at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).