> Yes. But that's not the only source for DECL_UID differences. Btw,
> I see lots of FOR_EACH_HASH_TABLE_ELEMENT in var-tracking.c
> but they don't look like their outcome is supposed to be dependent on
> element ordering.
This leads to NOTE_INSN_VAR_LOCATION notes emitted in a different order, which
are then interpreted by dwarf2out_var_location. In particular:
(note 6350 6349 6351 (var_location temp (nil)) NOTE_INSN_VAR_LOCATION)
(note 6351 6350 6352 (var_location temp$low (mem/c:DI (plus:SI (reg/f:SI 30
%fp)
(const_int -112 [0xffffffffffffff90])) [10 MEM[(struct cpp_num
*)&result + 8B]+0 S8 A64])) NOTE_INSN_VAR_LOCATION)
(note 6352 6351 6353 (var_location temp$8 (nil)) NOTE_INSN_VAR_LOCATION)
[...]
(code_label 2091 6355 2092 79 912 "" [1 uses])
(note 2092 2091 5271 79 [bb 79] NOTE_INSN_BASIC_BLOCK)
is interpreted differently from:
(note 6350 6349 6351 (var_location temp (nil)) NOTE_INSN_VAR_LOCATION)
(note 6351 6350 6352 (var_location temp$8 (nil)) NOTE_INSN_VAR_LOCATION)
(note 6352 6351 6353 (var_location temp$low (mem/c:DI (plus:SI (reg/f:SI 30
%fp)
(const_int -112 [0xffffffffffffff90])) [10 MEM[(struct cpp_num
*)&result + 8B]+0 S8 A64])) NOTE_INSN_VAR_LOCATION)
[...]
(note 2092 2091 5271 79 [bb 79] NOTE_INSN_BASIC_BLOCK)
@@ -32608,6 +32608,17 @@
.uleb128 0x8
.byte 0x93 ! DW_OP_piece
.uleb128 0x8
+ .uaword .LLVL592-.LLtext0 ! Location list begin address
(*.LLLST153)
+ .uaword .LLVL597-.LLtext0 ! Location list end address
(*.LLLST153)
+ .uahalf 0x9 ! Location expression size
+ .byte 0x93 ! DW_OP_piece
+ .uleb128 0x8
+ .byte 0x8e ! DW_OP_breg30
+ .sleb128 -112
+ .byte 0x93 ! DW_OP_piece
+ .uleb128 0x8
+ .byte 0x93 ! DW_OP_piece
+ .uleb128 0x8
.uaword .LLVL695-.LLtext0 ! Location list begin address
(*.LLLST153)
.uaword .LLVL696-.LLtext0 ! Location list end address
(*.LLLST153)
.uahalf 0xe ! Location expression size
probably because the non-null location comes last in the second case.
--
Eric Botcazou