------- Comment #2 from ubizjak at gmail dot com 2008-08-30 14:05 ------- Confirmed, uninitialized register [st(2)] happens in bb-reorder pass:
before bb-reorder we have: ;; Start of basic block ( 10 3 9 6) -> 11 ;; lr in 7 [sp] 8 [st] 9 [st(1)] 10 [st(2)] 20 [frame] ;; lr use 7 [sp] 8 [st] 9 [st(1)] 10 [st(2)] ;; lr def 3 [bx] 4 [si] 6 [bp] 7 [sp] 8 [st] 9 [st(1)] 17 [flags] ;; live in 7 [sp] 8 [st] 9 [st(1)] 10 [st(2)] 20 [frame] ... (insn:HI 70 69 71 11 pr37286.f90:46 (set (reg:DF 9 st(1) [80]) (mult:DF (float_extend:DF (reg/v:SF 10 st(2) [orig:60 monte_temp ] [60])) (reg:DF 9 st(1) [79]))) 756 {*fop_df_4_i387} (expr_list:REG_DEAD (reg/v:SF 10 st(2) [orig:60 monte_temp ] [60]) (nil))) after bb-reorder pass we have in (bb 9): ;; Start of basic block ( 2) -> 9 ;; bb 9 artificial_defs: { } ;; bb 9 artificial_uses: { u-1(6){ }u-1(7){ }} ;; lr in 3 [bx] 4 [si] 6 [bp] 7 [sp] 20 [frame] ;; lr use 3 [bx] 4 [si] 6 [bp] 7 [sp] ;; lr def 0 [ax] 1 [dx] 2 [cx] 8 [st] 9 [st(1)] 10 [st(2)] 11 [st(3)] 12 [st(4)] 13 [st(5)] 14 [st(6)] 15 [st(7)] 17 [flags] 18 [fpsr] 19 [fpcr] 21 [] 22 [] 23 [] 24 [] 25 [] 26 [] 27 [] 28 [] 29 [] 30 [] 31 [] 32 [] 33 [] 34 [] 35 [] 36 [] 37 [] 38 [] 39 [] 40 [] 41 [] 42 [] 43 [] 44 [] 45 [] 46 [] 47 [] 48 [] 49 [] 50 [] 51 [] 52 [] ;; live in 3 [bx] 4 [si] 6 [bp] 7 [sp] 20 [frame] ;; live gen 8 [st] 9 [st(1)] ;; live kill ... (insn 146 145 147 9 pr37286.f90:46 (set (reg:DF 9 st(1) [80]) (mult:DF (float_extend:DF (reg/v:SF 10 st(2) [orig:60 monte_temp ] [60])) (reg:DF 9 st(1) [79]))) 756 {*fop_df_4_i387} (expr_list:REG_DEAD (reg/v:SF 10 st(2) [orig:60 monte_temp ] [60]) (nil))) reg-stack then chokes due to: Basic block 2 Input stack: empty insn 7 input stack: empty insn 8 input stack: [ 8 ] insn 126 input stack: [ 8 9 ] scanning new insn with uid = 172. Expected live registers [ 8 9 ] Output stack: [ 9 8 ] Basic block 9 Input stack: empty insn 17 input stack: empty insn 18 input stack: empty insn 19 input stack: [ 9 ] insn 145 input stack: [ 9 8 ] insn 146 input stack: [ 9 8 ] scanning new insn with uid = 173. Please note that input stack of bb 9 and output stack of bb2 doesn't match. -- ubizjak at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|target |rtl-optimization Ever Confirmed|0 |1 Keywords|ra | Last reconfirmed|0000-00-00 00:00:00 |2008-08-30 14:05:31 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37286