xgcc (GCC) 3.5-tree-ssa-lno 20040318 (merged 20040221) get an ICE at while doing profiledbootstrap (after stage1, while compiling libgcc). Configured with ../gcc/configure --program-suffix=-3.5-tree-ssa-lno --enable-languages=c --with-arch=athlon-xp --disable-checking --disable-werror Bootstrap started with make CFLAGS='-O2 -fomit-frame-pointer -fweb' STAGE1_CFLAGS='-O2 -fomit-frame-pointer -fweb' BOOT_CFLAGS='-O3 -fomit-frame-pointer -fno-rename-registers' profiledbootstrap [snip] ./xgcc -B./ -B/usr/local/i686-pc-linux-gnu/bin/ -isystem /usr/local/i686-pc-linux-gnu/include -isystem /usr/local/i686-pc-linux-gnu/sys-include -L/usr/local/src/gcc/lno/build/gcc/../ld -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libbanshee/libcompat -I../../gcc/gcc/../libbanshee -I../../gcc/gcc/../libbanshee/points-to -DL_divdi3 -c ../../gcc/gcc/libgcc2.c -fexceptions -fnon-call-exceptions -o libgcc/./_divdi3.o ../../gcc/gcc/libgcc2.c: In function `__divdi3': ../../gcc/gcc/libgcc2.c:1014: internal compiler error: in cgraph_remove_edge, at cgraph.c:292 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. make[3]: *** [libgcc/./_divdi3.o] Ошибка 1 make[3]: Leaving directory `/usr/local/src/gcc/lno/build/gcc' make[2]: *** [libgcc.a] Ошибка 2 make[2]: Leaving directory `/usr/local/src/gcc/lno/build/gcc' make[1]: *** [stageprofile_build] Ошибка 2 make[1]: Leaving directory `/usr/local/src/gcc/lno/build/gcc' make: *** [profiledbootstrap] Ошибка 2
This is almost definitely caused by the kernel headers defining inline as inline __attribute__((always_inline)) which is not right. Can you provide the preprocessed source.
[I cannot add an attachment?!?! bugzilla says me 'You did not specify a file to attach', but I do!] probably yes, because of always_inline; but in libgcc2.c:484 or libgcc2.c:782 and not in Mariusz Mazur's carefully edited kernel headers for linux 2.6.0 and up (cvs://cvs.pld-linux.org/linux-libc-headers).
Surely this is miscompilation of gcc itself. I changed BOOT_CFLAGS from '-O3 -fomit-frame-pointer -fno-rename-registers' to '-O2 -fomit-frame-pointer -fweb' and this 'bug' disappeares. Reduced testcase for above, obviously invalid, bug is just static int f () {return 0;} void g () {f ();} Is -O3 option supposed to generate invalid code in lno and tree-ssa or this is something new?
What compiler are you building with as if the compiler is miscompiled it might because of the frist stage compiler is miscompiled? Do not set STAGE1_CFLAGS without knowing what the consensus are like this one.
I build stage1 with gcc-3.4.0-20040318 -O2 -fomit-frame-pointer -fweb. But I am sure that stage1 is not miscompiled. I now found that stage2 miscompiled only when BOOT_CFLAGS set to '-O2 -finline-functions' (with the same symptom like ICE in cgraph.c). I suppose that this bug is not specific to lno, now I am checking tree-ssa.
Ok, this bug is NOT present in current (20040319 00:30 UTC) tree-ssa. And this is true bug, I get same effect when I recompile lno (again 20040319 00:30 UTC) from scratch with: $ export CC=gcc-3.3 $ ../gcc/configure --program-suffix='-3.5-tree-ssa-lno' --enable-languages=c --with-arch=athlon-xp --disable-checking --disable-werror $ make CFLAGS='-O2' STAGE1_CFLAGS='-O0' BOOT_CFLAGS='-O2 -finline-functions' boootstrap Where gcc-3.3 is 100% stable gcc 3.3.4 checked out 20040306. Bootstrap fails with the same effect -- ICE in cgraph.c while compiling libgcc.a at stage2_build.
This might be related to PR 14433. When I did a full bootstrap, the bug was there. When I compiled tree-ssa by hand it disappeared. To me this looks like a miscompilation of the compiler. Fortunately, the bug disappeared on 2004-03-12. I don't know when it appeared (since doing a full bootstrap for each iteration of a binary search was just too much work). Since the last merge of the lno-branch was before that date, it might be possible that you ran into the same problem on the lno-branch. To support that theory you might want to try tree-ssa as of 2004-03-10 and see whether you can reproduce the problem there. Or you can wait for the next lno-merge, and see whether the bug disappears or not.
This bug is present in 3.5-tree-ssa 20040309 (cvs up -D 20040310 -r tree-ssa-20020619-branch) with same syndrome.
Confirmed, waiting for a merge.
Can someone try again as now the lno branch has been merged from the tree-ssa again today (from today too)?
make bootstrap of gcc 3.5-tree-ssa-lno 20040321 (merged 20040321) with BOOT_CFLAGS set to '-O2 -finline-functions' succeeds, so this PR is over.