This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/60533] [4.8/4.9 regression] Error introduced by bb-reorder at -O3


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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-03-15
     Ever confirmed|0                           |1

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Following bb-reorder, insns 266 and 268 are now in block 12, but insn 283 is
> in block 87, a great distance away.  As a result, r6 is now upward exposed
> by insn 283 in block 87, which has blocks 12 and 86 as predecessors.  Block
> 86 ends with a call in insn 887, which clobbers the volatile register r6. 
> So along the path from block 86 to block 87, insn 283 is guaranteed to see
> garbage in r6.
> 
> There is nothing in the prior graph corresponding to a path from block 86 to
> block 87; this bogus path was introduced by the block reordering.

Right, because there is a barrier right after the call in the prior graph:

(call_insn 887 885 888 109 (parallel [
            (set (reg:DI 3 3)
                (call (mem:SI (symbol_ref/i:DI
("_ZN5vigra6detail14UnionFindArrayIiE9makeUnionEii") [flags 0x1] 
<function_decl 0x1ffffbc04a00 makeUnion>) [0 makeUnion S4 A8])
                    (const_int 0 [0])))
            (clobber (reg:DI 65 lr))
        ])
/home/ubuntu/libvigraimpex/ubuntu1/libvigraimpex-1.10.0+dfsg/include/vigra/labelvolume.hxx:287
625 {*call_value_nonlocal_aixdi}
     (expr_list:REG_DEAD (reg:DI 5 5)
        (expr_list:REG_DEAD (reg:DI 4 4)
            (expr_list:REG_DEAD (reg:DI 2 2)
                (expr_list:REG_UNUSED (reg:DI 3 3)
                    (expr_list:REG_EH_REGION (const_int 0 [0])
                        (nil))))))
    (expr_list:REG_DEP_TRUE (use (reg:DI 2 2))
        (expr_list:REG_LABEL_TARGET (use (reg:DI 5 5))
            (expr_list:REG_LABEL_TARGET (use (reg:DI 4 4))
                (expr_list:REG_LABEL_OPERAND (use (reg:DI 3 3))
                    (nil))))))
(barrier 888 887 889)

so the compiler thinks that the call never returns.  Can you find out why?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]