------- Comment #14 from hjl dot tools at gmail dot com  2009-01-29 15:53 
-------
Created an attachment (id=17211)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17211&action=view)
A patch

This patch only checks

--- gcc/varasm.c.pie    2008-11-30 08:49:54.000000000 -0800
+++ gcc/varasm.c        2009-01-29 07:50:46.000000000 -0800
@@ -6321,6 +6321,10 @@ default_binds_local_p_1 (const_tree exp,
           && (DECL_INITIAL (exp) == NULL
               || DECL_INITIAL (exp) == error_mark_node))
     local_p = false;
+  /* Functions without body are not local.  */
+  else if (TREE_CODE (exp) == FUNCTION_DECL
+          && DECL_INITIAL (exp) == NULL)
+    local_p = false;
   /* Otherwise we're left with initialized (or non-common) global data
      which is of necessity defined locally.  */
   else


-- 


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

Reply via email to