This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

inlining failed


Hi,

when compiling the program

static inline void f() {    
    int a,b,c,d,e,f,g,h,i,j;

    for (a = 0; a < 10; a++) {
    }

    for (b = 0; b < 10; b++) {
    }
}
int main() {
    f();
}

with "gcc -O2 -Winline -std=gnu99 test.c", using gcc-3.3.1 on a i386 arch i 
get a 

test.c: In function `main':
test.c:1: warning: inlining failed in call to `f'
test.c:12: warning: called from here

And actually, f() isn't inlined (I checked it). If I omit one of the variables 
or one of the loops, it is inlined. I do not understand why, maybe there is a 
bug?

Gunther


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]