https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29461
Richard Biener changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Richard Biener ---
<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
0012 v000 v000 views at 000c for:
0008 (DW_OP_reg5 (rdi))
0017 v000 v000 views at 000e for:
0008 0012 (DW_OP_reg3 (rbx))
001c v000 v000 views at 0010 for:
0012 0013 (DW_OP_entry_value: (DW_OP_reg5
(rdi)); DW_OP_stack_value)
0024
002b v001 v000 views at 0025 for:
0004 0008 (DW_OP_reg5 (rdi))
0030 v000 v000 views at 0027 for:
0008 0012 (DW_OP_reg3 (rbx))
0035 v000 v000 views at 0029 for:
0012 0013 (DW_OP_entry_value: (DW_OP_reg5
(rdi)); DW_OP_stack_value)
003d
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
callfunc
-O0 vs -O is also -fno-var-tracking vs. -fvar-tracking of course.