This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/49618] When building uClibc with GCC 4.6.1 old_atexit is miscompiled


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49618

--- Comment #2 from TÃrÃk Edwin <edwintorok at gmail dot com> 2011-07-03 15:07:02 UTC ---
(In reply to comment #1)
> Ouch. I can see where it might be NULLâ but in anal-C99 taking a pointer of
> an object (&__dso_handle) can never be a NULL pointer, so GCC might, in a
> very theoretical sense, be correct in optimising away this check.
> 
> Does adding -fno-delete-null-pointer-checks to the compile options help?

No, with -fno-delete-null-pointer-checks the 'beq' instruction is still
deleted.

-O1 works though.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]