PATCH: [4.1 Regression]: java compiler generates wrong code on ia64

H. J. Lu hjl@lucon.org
Sun Apr 17 19:11:00 GMT 2005


Linkonce and weak functions are never local. I am not if the similar
bug exists in other places:


H.J.
---
2005-04-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR java/21070
	* class.c (make_local_function_alias): Don't treat linkonce and
	weak functions as local.

--- gcc/java/class.c.linkonce	2005-04-14 10:06:01.000000000 -0700
+++ gcc/java/class.c	2005-04-17 12:04:52.976784927 -0700
@@ -1204,8 +1204,11 @@ make_local_function_alias (tree method)
   char *name = alloca (strlen (method_name) + 2);
   char *buf = alloca (strlen (method_name) + 128);
 
-  /* Only create aliases for local functions.  */
-  if (DECL_EXTERNAL (method))
+  /* Only create aliases for local functions.  Linkonce and weak
+     functions are never local.  */
+  if (DECL_EXTERNAL (method)
+      || DECL_ONE_ONLY (method)
+      || DECL_WEAK (method))
     return method;
     
   /* Prefix method_name with 'L' for the alias label.  */



More information about the Gcc-patches mailing list