[trunk][patch] fix another invalid sharing in see

Rafael Espindola espindola@google.com
Tue May 27 15:49:00 GMT 2008


> What about changing this to:
>
>  validate_replace_rtx (&ref_copy, dest_reg, subreg, NULL);
>
> instead (I don't think we even need to copy there, validate_replace_rtx will
> unshare automatically)?

Fails:

/home/espindola/test.i: In function 'g':
/home/espindola/test.i:3: internal compiler error: RTL check: access
of elt 5 of 'subreg' with last elt 1 in validate_replace_rtx, at
recog.c:715

ref_copy that is being passed to validate_replace_rtx is

(insn 26 0 0 /home/espindola/test.i:1 (parallel [
            (set (reg:SI 63)
                (div:SI (reg/v:SI 59 [ a ])
                    (reg/v:SI 60 [ b ])))
            (set (reg:SI 64)
                (mod:SI (reg/v:SI 59 [ a ])
                    (reg/v:SI 60 [ b ])))
            (clobber (reg:CC 17 flags))
        ]) -1 (expr_list:REG_DEAD (reg/v:SI 60 [ b ])
        (expr_list:REG_DEAD (reg/v:SI 59 [ a ])
            (expr_list:REG_UNUSED (reg:SI 64)
                (expr_list:REG_UNUSED (reg:CC 17 flags)
                    (nil))))))



> I also fail to see the need for this:
>
>      /* Create a new copy.  */
>      ref_copy = see_copy_insn (ref);
>
> which appears later in the same function.
>
> Paolo
>


Cheers,
-- 
Rafael Avila de Espindola

Google Ireland Ltd.
Gordon House
Barrow Street
Dublin 4
Ireland

Registered in Dublin, Ireland
Registration Number: 368047



More information about the Gcc-patches mailing list