inlining failed
Gunther Piez
gpiez@web.de
Sat Sep 6 12:15:00 GMT 2003
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
More information about the Gcc
mailing list