On 10/16/14 15:33, Oleg Endo wrote:
Hi,

While working on some SH builtins I ran into the issue that the function
true_regnum in jump.c tries to access the reg_renumber array without
checking for nullptr.  The particular use case here is using true_regnum
in a predicate that is invoked during builtin function expansion in the
TARGET_EXPAND_BUILTIN function.  It seems that at that time reg_renumber
hasn't been initialized yet.  Adding the nullptr check fixes the issue.

OK for trunk?

Cheers,
Oleg

gcc/ChangeLog:
        * jump.c (true_regnum): Check that reg_renumber is not null
        before accessing it.
You're not supposed to be using true_regnum prior to register allocation. You're probably better off with a new predicate to handle this case.

jeff

Reply via email to