------- Comment #3 from jakub at gcc dot gnu dot org  2009-09-14 17:36 -------
Another testcase for the vartrack bug:
int
foo (int i)
{
  asm volatile ("" : "+r" (i));
  int i1 = 2 * i;
  int i2 = 2 * i;
  int i3 = 2 * i;
  return i;
}

(debug_insn 8 6 9 2 d6.c:4 (var_location:SI i (reg:SI 0 ax [60])) -1 (nil))
(debug_insn 9 8 10 2 d6.c:5 (var_location:SI i1 (mult:SI (reg:SI 0 ax [60])
        (const_int 2 [0x2]))) -1 (nil))
(debug_insn 10 9 11 2 d6.c:6 (var_location:SI i2 (mult:SI (reg:SI 0 ax [60])
        (const_int 2 [0x2]))) -1 (nil))
(debug_insn 11 10 19 2 d6.c:7 (var_location:SI i3 (mult:SI (reg:SI 0 ax [60])
        (const_int 2 [0x2]))) -1 (nil))
(insn 19 11 24 2 d6.c:9 (use (reg/i:SI 0 ax)) -1 (nil))
looks sane to me, but:
(note 30 6 29 2 (var_location i (expr_list:REG_DEP_TRUE (reg:SI 0 ax [60])
    (const_int 0 [0x0]))) NOTE_INSN_VAR_LOCATION)
(note 29 30 33 2 (var_location i (nil)) NOTE_INSN_VAR_LOCATION)
(note 33 29 32 2 (var_location i1 (nil)) NOTE_INSN_VAR_LOCATION)
(note 32 33 31 2 (var_location i (nil)) NOTE_INSN_VAR_LOCATION)
(note 31 32 34 2 (var_location i1 (expr_list:REG_DEP_TRUE (ashift:SI (reg:SI 0
ax [60])
        (const_int 1 [0x1]))
    (const_int 0 [0x0]))) NOTE_INSN_VAR_LOCATION)
(note 34 31 35 2 (var_location i2 (nil)) NOTE_INSN_VAR_LOCATION)
(note 35 34 19 2 (var_location i3 (nil)) NOTE_INSN_VAR_LOCATION)
(insn 19 35 24 2 d6.c:9 (use (reg/i:SI 0 ax)) -1 (nil))
not.


-- 


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

Reply via email to