This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/51643] Incorrect code produced for tail-call of weak function with -O2/-O3 option
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 21 Dec 2011 09:53:24 +0000
- Subject: [Bug target/51643] Incorrect code produced for tail-call of weak function with -O2/-O3 option
- Auto-submitted: auto-generated
- References: <bug-51643-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51643
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |arm-eabi
--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-21 09:53:24 UTC ---
Technically this bug is invalid (undefined is undefined, not consistent). ARM
maintainers may want to disallow tail/sibling calls to possibly weak targets.
The ABI is inconsistent itself, btw, as
weak_fn ();
beahaves different than
*(&weak_fn) ();
as I presume the linker cannot do anything for indirect calls to weak
functions.