------- Comment #24 from mikulas at artax dot karlin dot mff dot cuni dot cz  
2009-08-11 21:01 -------
Another case when stack frame is spuriously generated:

/* -O2 -fomit-frame-pointer -mno-accumulate-outgoing-args */

void __attribute__((__noreturn__)) crash(__const__ char *, ...);

void F(int *q)
{
        while (1) {
                if (*q < 0)
                        crash("buuu");
                if (!*q)
                        break;
                q++;
        }
}

--- stack frame is generated for no apparent reason. The switch that actually
does it is -ftree-ch (with -fno-tree-ch, the stack frame is not generated).
This is not misgenerated code byt it may indicate that something bad is going
on in the compiler. The conditions are very peculiar ...


-- 


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

Reply via email to