This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/26552] gcc.dg/sibcall-6.c fails on x86-darwin with default options
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Mar 2006 23:40:49 -0000
- Subject: [Bug target/26552] gcc.dg/sibcall-6.c fails on x86-darwin with default options
- References: <bug-26552-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-03-03 23:40 -------
Here is the patch which should fix this bug:
Index: i386.c
===================================================================
--- i386.c (revision 111688)
+++ i386.c (working copy)
@@ -2232,7 +2232,9 @@ ix86_function_ok_for_sibcall (tree decl,
/* If we are generating position-independent code, we cannot sibcall
optimize any indirect call, or a direct call to a global function,
as the PLT requires %ebx be live. */
- if (!TARGET_64BIT && flag_pic && (!decl || !targetm.binds_local_p (decl)))
+ if (!TARGET_MACHO
+ && !TARGET_64BIT
+ && flag_pic && (!decl || !targetm.binds_local_p (decl)))
return false;
if (decl)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26552