[Bug c++/53602] [4.7/4.8 Regression] Libre Office causes an internal compiler error

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jun 8 07:51:00 GMT 2012


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rth at gcc dot gnu.org

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-06-08 07:51:25 UTC ---
We end up with:
(insn 38 73 40 5 (parallel [
            (set (reg/f:SI 7 sp)
                (plus:SI (reg/f:SI 7 sp)
                    (const_int 12 [0xc])))
            (clobber (reg:CC 17 flags))   
        ]) pr53602.ii:359 251 {*addsi_1}  
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (expr_list:REG_ARGS_SIZE (const_int 0 [0])
            (nil))))

(insn 40 38 41 5 (parallel [
            (set (reg/f:SI 7 sp)
                (plus:SI (reg/f:SI 7 sp)
                    (const_int -12 [0xfffffffffffffff4])))
            (clobber (reg:CC 17 flags))
        ]) pr53602.ii:64 251 {*addsi_1}
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (expr_list:REG_ARGS_SIZE (const_int 12 [0xc])
            (nil))))

(insn 41 40 42 5 (set (mem/f:SI (pre_dec:SI (reg/f:SI 7 sp)) [0 S4 A32])
        (mem/f/c:SI (plus:SI (reg/f:SI 6 bp)
                (const_int -12 [0xfffffffffffffff4])) [3 D.3489.pData+0 S4
A32])) pr53602.ii:64 43 {*pushsi2}
     (expr_list:REG_ARGS_SIZE (const_int 16 [0x10])
        (nil)))

before csa and csa obviously merges the two into sp += 0 that it wants to
delete.
force_move_args_size is called with prev == NULL (as it is at the start of a
bb).  But apparently cleanup_cfg at the start of csa pass jump threaded the
call sequence starting at insn 41, so the two stack adjustments that cancel
each other end up the only insns in a bb.  So we trigger:
      /* ??? We *must* have a place, lest we ICE on the lost adjustment.
         Options are: dummy clobber insn, nop, or prevent the removal of
         the sp += 0 insn.  Defer that decision until we can prove this
         can actually happen.  */

I guess if we proved that all the predecessors of the bb have the same current
REG_ARGS_SIZE, or all the successor have the same current REG_ARGS_SIZE, we
could avoid the note altogether.  Or do one of the things the comment talks
about.  Richard, can you please handle this?



More information about the Gcc-bugs mailing list