------- Comment #6 from jakub at gcc dot gnu dot org  2009-07-10 09:44 -------
While this triggers only with -fvar-tracking, it is var-tracking related only
in that vt_find_locations calls pre_and_rev_post_order_compute.  The real
problem is that there are 2 basic blocks (in my case 220 and 222) that have no
predecessors, so aren't reachable from the entry block and therefore
gcc_assert (pre_order_num == n_basic_blocks - NUM_FIXED_BLOCKS);
assertion fails (pre_order_num is n_basic_blocks - NUM_FIXED_BLOCKS - 2).

In *.split3 we have:

(insn 4396 853 4397 204 pkg0017.adb:483 (set (mem/c:SF (plus:DI (reg/f:DI 6 bp)
                (const_int -1668 [0xfffffffffffff97c])) [0 S4 A32])
        (reg:SF 21 xmm0 [orig:143 D.79246 ] [143])) 98 {*movsf_1}
(expr_list:REG_DEAD (reg:SF 21 xmm0 [orig:143 D.79246 ] [143])
        (nil)))
(insn 4397 4396 854 204 pkg0017.adb:483 (set (reg:SF 8 st)
        (mem/c:SF (plus:DI (reg/f:DI 6 bp)
                (const_int -1668 [0xfffffffffffff97c])) [0 S4 A32])) 98
{*movsf_1} (nil))
(insn 854 4397 862 204 pkg0017.adb:483 (set (reg:XF 9 st(1) [orig:147 D.79250 ]
[147])
        (float_extend:XF (reg:SF 8 st))) 137 {*extendsfxf2_i387}
(expr_list:REG_DEAD (reg:SF 8 st)
        (expr_list:REG_EH_REGION (const_int 387 [0x183])
            (nil))))
;; End of basic block 204 -> ( 205 220)

...
;; Start of basic block ( 204) -> 220
;; bb 220 artificial_defs: { d-1(0){ }d-1(1){ }}
;; bb 220 artificial_uses: { u-1(6){ }u-1(7){ }u-1(16){ }u-1(20){ }}
;; lr  in        6 [bp] 7 [sp] 16 [argp] 20 [frame]
;; lr  use       6 [bp] 7 [sp] 16 [argp] 20 [frame]
;; lr  def       0 [ax] 1 [dx] 42 [r13]

;; Pred edge  204 (ab,eh)
(code_label 3492 4766 3497 220 941 "" [0 uses])

but in *.stack:

(insn 4396 853 4397 204 pkg0017.adb:483 (set (mem/c:SF (plus:DI (reg/f:DI 6 bp)
                (const_int -1668 [0xfffffffffffff97c])) [0 S4 A32])
        (reg:SF 21 xmm0 [orig:143 D.79246 ] [143])) 98 {*movsf_1}
(expr_list:REG_DEAD (reg:SF 21 xmm0 [orig:143 D.79246 ] [143])
        (nil)))
(insn 4397 4396 862 204 pkg0017.adb:483 (set (reg:SF 8 st)
        (mem/c:SF (plus:DI (reg/f:DI 6 bp)
                (const_int -1668 [0xfffffffffffff97c])) [0 S4 A32])) 98
{*movsf_1} (nil))
;; End of basic block 204 -> ( 205)

...
;; Start of basic block () -> 220
;; bb 220 artificial_defs: { d-1(0){ }d-1(1){ }}
;; bb 220 artificial_uses: { u-1(6){ }u-1(7){ }u-1(16){ }u-1(20){ }}
;; lr  in        6 [bp] 7 [sp] 16 [argp] 20 [frame]
;; lr  use       6 [bp] 7 [sp] 16 [argp] 20 [frame]
;; lr  def       0 [ax] 1 [dx] 42 [r13]

(code_label 3492 4766 3497 220 941 "" [0 uses])

So, either the float_extend is considered throwing when it shouldn't (when
would float_extend throw?  Only for signalling NaN?), or reg-stack.c is
forgetting to cleanup the CFG when it removed insns with REG_EH_REGION.  In any
case it definitely doesn't look like var-tracking.c's fault.


-- 


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

Reply via email to