Summary: | sys-devel/gcc-4.3.3 miscompiles some code while inlining with -fguess-branch-probability | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Boney McCracker <brendlerjg> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED WORKSFORME | ||
Severity: | major | CC: | gengor, please.no.spam.here |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://gcc.gnu.org/PR39333 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Boney McCracker
2009-02-07 07:39:39 UTC
Did it crash with gcc 4.3.2 ? If not, could this be a _FORTIFY_SOURCE problem ? (In reply to comment #1) > Did it crash with gcc 4.3.2 ? > If not, could this be a _FORTIFY_SOURCE problem ? No, it did not crash with 4.3.2. (In reply to comment #2) > (In reply to comment #1) > > Did it crash with gcc 4.3.2 ? > > If not, could this be a _FORTIFY_SOURCE problem ? > > No, it did not crash with 4.3.2. > In that case, could you see if it's _FORTIFY_SOURCE problem ? To test it, I think 'append-flags -U_FORTIFY_SOURCE' is required. If not, that would be an interesting regression. Never mind, tested myself and it didn't work. Looks like it is a gcc regression. I just got around to this, and 'append-flags -U_FORTIFY_SOURCE' didn't make any difference. Thanks for the suggestion, though. For today: -O2 fails, -O1 works. See you back tomorrow (maybe). And with a new day, comes following conclusion: -O2 seems to work with -fno-inline-small-functions Now somebody has to figure out if it's a problem with freeciv or with gcc. It's been awhile since I visited this bug. Upstream has since "fixed" this bug, however it looks like this bug should be reassigned and its severity risen - this seems to be a compiler bug, one reproducible in other apps. If you disagree, reassign it back, but read http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39333 first, then http://bugs.winehq.org/show_bug.cgi?id=17406. It may be a coincidence, but if it's not, there's no telling how widespread the problem is by now. If you can confirm it or create a testcase, please, do. can you try emerging gcc-4.3.3 with USE=vanilla and see if the problem still occurs ? (In reply to comment #9) > can you try emerging gcc-4.3.3 with USE=vanilla and see if the problem still > occurs ? > If this is aimed at me, I'll think about it. However, the seemingly related wine bug was definitely not Gentoo related. My problem is that when I first setup my system, I created a bit too small partition and now the space requirements for gcc reemerge are about equal max free space I can acquire, so I only reemerge gcc, when I have a VERY good reason. One more thing: the person who reported the wine bug seems to be one of the devs of another source-based distro - Source Mage. Maybe you should compare notes ? Shouldn't a message be added to the freeciv ebuild? It seems that the gcc problem is fixed in gcc 4.4.0. However, accidentally I discovered a different bug in 4.3.3. If '-fno-guess-branch-probability' is used, src/id.c from coreutils-7.2 gets miscompiled and 'id -u' prints "id: cannot print "only" of more than one choice". gcc-4.4.x is stable, so not going to spend time on this if there is no fix available for us to drop in |