[Bug tree-optimization/49618] When building uClibc with GCC 4.6.1 old_atexit is miscompiled
ernews at gmx dot de
gcc-bugzilla@gcc.gnu.org
Sun Jul 3 20:10:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49618
Eugene Rudoy <ernews at gmx dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ernews at gmx dot de
--- Comment #7 from Eugene Rudoy <ernews at gmx dot de> 2011-07-03 20:09:42 UTC ---
(In reply to comment #4)
> With the Patch from [1] I could boot a firmware-image on my router.
It seems the "if-conversion"-opt is not the actual reason. It does solve the
issue, but it's not the reason. Explanation: "if-conversion" is enabled by
default at -O1. The code is however not miss-compiled when compiled using -O1
(-Os causes it to be miss-compiled).
I found out that disabling gcse and cse-follow-jumps (i.e. passing -fno-gcse
-fno-cse-follow-jumps [1]) also solves the issue. As the optimization level
(-O2/-Os) these both are by default enabled on correspond to the -Os flag we
use I consider them to be the actual reason for the miss-compiling.
[1] http://freetz.org/attachment/ticket/1310/gcc-4.6.x-disable-opt-flags.patch
More information about the Gcc-bugs
mailing list