This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49618] When building uClibc with GCC 4.6.1 old_atexit is miscompiled
- From: "ernews at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 3 Jul 2011 20:10:19 +0000
- Subject: [Bug tree-optimization/49618] When building uClibc with GCC 4.6.1 old_atexit is miscompiled
- Auto-submitted: auto-generated
- References: <bug-49618-4@http.gcc.gnu.org/bugzilla/>
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