On Tue Jul 17 22:23:38 2007, petdance wrote:
> In function branch_branch, there's a line like this:
> 
>    ins->r[get_branch_regno(ins)] = next->r[0];
> 
> That call to get_branch_regno() can return -1.  That would make a  
> negative array index, and stomp on who knows what.
> 


Grepping ./compilers/imcc/optimizer.c for get_branch_regno, I get:

365:                (reg = get_branch_regno(last)) >= 0) {
1082:        if (get_branch_regno(ins) >= 0) {
1094:                    const int regno = get_branch_regno(ins);
1251:            reg_index = get_branch_regno(cond);
1327:                               get_branch_regno(cond) >= 0) {

... which suggests that the code Andy was referencing no longer appears
in this file.

Are the issues raised in this thread still pertinent?

Thank you very much.
kid51


Reply via email to