------- Additional Comments From steven at gcc dot gnu dot org  2005-06-09 
09:22 -------
In this case we obviously take the "tail_recursion" sequence, which is 
already wrong: 
 
  (const_string "tail_recursion") (sequence [ 
    (note 22 0 23 NOTE_INSN_DELETED) 
    (note 23 22 25 NOTE_INSN_DELETED) 
    (insn 25 23 26 (set (reg:SI 59) 
                (reg/v:SI 58 [ n ])) -1 (nil) 
            (nil)) 
    (insn 26 25 24 (set (reg/v:SI 58 [ n ]) 
                (reg:SI 59)) -1 (nil) 
            (nil)) 
    (insn 24 26 28 (parallel [ 
                    (set (reg/v:SI 58 [ n ]) 
                        (plus:SI (reg/v:SI 58 [ n ]) 
                            (const_int 1 [0x1]))) 
                    (clobber (reg:CC 17 flags)) 
                ]) -1 (nil) 
            (nil)) 
    (jump_insn 28 24 29 (set (pc) 
                (label_ref 27)) -1 (nil) 
            (nil)) 
    (barrier 29 28 30) 
    (barrier 30 29 0) 
    ]) 
 
Note that the "n++" (insn 24) is before the jump to the tail recursion 
label at the head of the function (jump_insn 28). 
 
So the initial RTL generation is wrong. 
 
 

-- 


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

Reply via email to