This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
inlining failed
- From: Gunther Piez <gpiez at web dot de>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 6 Sep 2003 13:39:04 +0200
- Subject: 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