[Bug tree-optimization/15520] [3.5 Regression] miscompilation in tree-dom

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu May 20 02:34:00 GMT 2004


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-19 12:59 -------
the code I was working from is:
#define car(cons) (((struct Cons*)(cons & ~1))->car)
#define cdr(cons) (((struct Cons*)(cons & ~1))->cdr)
#define consp(cons) ((cons & 1u) == 1u)

void record_buffer (int buf)
{
        int link, prev;
        int temp, temp1, temp2;

        prev = nil;
        link = alist;
        goto end;
begin:  
        temp2 = link & ~1;
        temp = ((struct Cons*)temp2)->car;
        temp1 = temp & ~1;
        if (((struct Cons*)temp1)->cdr == buf)
                goto exitloop;
        prev = link;
        link = ((struct Cons*)temp2)->cdr;
end:
        if (consp (link)) goto begin;
exitloop:

        if (prev >> 3 == nil >> 3)
                alist = cdr (alist);
        else
                cdr (prev) = cdr (cdr (prev));

        cdr (link) = alist;
        alist = link;
}

I did some transformations already as the differences with the orginal code made the differences before 
and after DOM too much to look at.

-- 


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



More information about the Gcc-bugs mailing list