This is the mail archive of the gcc-patches@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]

Fix cgraph availability bug


Hi,
there is important bug in cgraph_function_body_availability making all
external function bodies available.  This would lead to IPA that is not
compatible with overwritting symbols at dynamic link time.

Bootstrapped/regtested i686-linux, will commit it shortly.

	* cgraph.c (cgraph_function_body_availability): Fix typo in
	externally_visible test.
Index: cgraph.c
===================================================================
--- cgraph.c	(revision 141788)
+++ cgraph.c	(working copy)
@@ -1423,7 +1423,7 @@ cgraph_function_body_availability (struc
     avail = AVAIL_NOT_AVAILABLE;
   else if (node->local.local)
     avail = AVAIL_LOCAL;
-  else if (node->local.externally_visible)
+  else if (!node->local.externally_visible)
     avail = AVAIL_AVAILABLE;
 
   /* If the function can be overwritten, return OVERWRITABLE.  Take


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