re PR target/25377 (weakref sibcalled with -fPIC)
authorAndrew Pinski <pinskia@physics.uc.edu>
Fri, 3 Feb 2006 03:56:55 +0000 (03:56 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Fri, 3 Feb 2006 03:56:55 +0000 (19:56 -0800)
2006-02-02  Andrew Pinski  <pinskia@physics.uc.edu>

        PR target/25377
        * config/i386/i386.c (ix86_function_ok_for_sibcall):
        Use targetm.binds_local_p instead of TREE_PUBLIC.

From-SVN: r110537

gcc/ChangeLog
gcc/config/i386/i386.c

index 103892c02c523bdd29c233816a558b42a461c78c..83d13e78b22f9cf7ab6ce8cc1bbfd5bd5cf2dafb 100644 (file)
@@ -1,3 +1,9 @@
+2006-02-02  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR target/25377
+       * config/i386/i386.c (ix86_function_ok_for_sibcall):
+       Use targetm.binds_local_p instead of TREE_PUBLIC.
+
 2006-02-02  Roger Sayle  <roger@eyesopen.com>
 
        * tree.h (TYPE_STRING_FLAG): Document that this field may be used
index ed23c86a1d44180911d50c6d3c76b9c1562b60dc..27b42ea7d9c89519aec06e17f98ab17b543e43e8 100644 (file)
@@ -2228,7 +2228,7 @@ ix86_function_ok_for_sibcall (tree decl, tree exp)
   /* 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)