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 target/25377] [4.2 Regression] weakref sibcalled with -fPIC



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-01-31 16:42 -------
And yes that fixed my reduced testcase.
The patch is:
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c  (revision 110396)
+++ config/i386/i386.c  (working copy)
@@ -2211,7 +2211,7 @@ 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 || TREE_PUBLIC (decl)))
+  if (!TARGET_64BIT && flag_pic && (!decl || !targetm.binds_local_p (decl)))
     return false;

   if (decl)


-- 


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


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